mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-28 12:54:22 +02:00
Basic community fixes PR (#460)
* Fixes #423 #423 * Do not adapt lights turned on with custom payloads. * Update switch.py * Issue fixes #423, #378, #403, #449 * quickly test #274 * Revert feature requests, this branch only has fixes. Reverted FR 274 * pre-commit fix * Create automerge.yaml * test * Delete automerge.yaml My bad. * Fix #460 and #408 * see @basnijholt 's comment in #450. * @basnijholt requested changes. --------- Co-authored-by: Bas Nijholt <bas@nijho.lt>
This commit is contained in:
parent
87391e6d24
commit
c6a6cd323f
3 changed files with 27 additions and 9 deletions
|
|
@ -527,11 +527,18 @@ async def test_manual_control(hass):
|
|||
await turn_switch(True, entity_id)
|
||||
assert not manual_control[ENTITY_LIGHT]
|
||||
|
||||
# Check that manual control is still enabled if set while bulb is off.
|
||||
# Test issue #37
|
||||
await turn_light(False)
|
||||
await change_manual_control(True)
|
||||
await turn_light(True)
|
||||
assert manual_control[ENTITY_LIGHT]
|
||||
|
||||
# Check that when 'adapt_brightness' is off, changing the brightness
|
||||
# doesn't mark it as manually controlled but changing color_temp
|
||||
# does
|
||||
await turn_light(False) # reset manually controlled status
|
||||
await turn_light(True)
|
||||
await turn_light(False)
|
||||
await turn_light(True) # reset manually controlled status
|
||||
assert not manual_control[ENTITY_LIGHT]
|
||||
await switch.adapt_brightness_switch.async_turn_off()
|
||||
await turn_light(True, brightness=increased_brightness())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue