hass-core/homeassistant
Abílio Costa 61634d0a64 Store ZHA light brightness when fading off to turn on at the correct brightness (#26680)
* Use light's on_level in ZHA to turn on at the correct brightness

Previously, if the light is turned off with a time transition, the
brightness level stored in the light will be 1. The next time the light
is turned on with no explicit brightness, it will be at 1.

This is solved by storing the current brightness in on_level before
turning off, and then using that when turning on (by calling the
onOff cluster 'on' command).

* store off light level locally to avoid wearing device's flash memory

* store off brightness in HA attributes

* improve set/clear of off_brightness

* fix device_state_attributes; clear off_brightness when light goes on

* fix tests
2019-09-23 09:08:44 -04:00
..
auth Use PEP 526 type annotations, add some type hints (#26464) 2019-09-07 09:48:58 +03:00
components Store ZHA light brightness when fading off to turn on at the correct brightness (#26680) 2019-09-23 09:08:44 -04:00
generated Izone component (#24550) 2019-09-19 23:31:54 +02:00
helpers Type hint additions (#26765) 2019-09-20 08:23:34 -07:00
scripts Type hint additions (#26765) 2019-09-20 08:23:34 -07:00
util Migrate legacy typehints in core to PEP-526 (#26403) 2019-09-03 20:36:04 -07:00
__init__.py
__main__.py Replaces IOError by OSError (#26428) 2019-09-04 19:09:24 +02:00
bootstrap.py Deprecate Python 3.6.0 (#26575) 2019-09-11 12:42:54 -06:00
config.py Replaces IOError by OSError (#26428) 2019-09-04 19:09:24 +02:00
config_entries.py Migrate legacy typehints in core to PEP-526 (#26403) 2019-09-03 20:36:04 -07:00
const.py Merge remote-tracking branch 'origin/master' into dev 2019-09-19 15:24:51 -07:00
core.py Migrate legacy typehints in core to PEP-526 (#26403) 2019-09-03 20:36:04 -07:00
data_entry_flow.py Migrate legacy typehints in core to PEP-526 (#26403) 2019-09-03 20:36:04 -07:00
exceptions.py Use literal string interpolation in core (f-strings) (#26166) 2019-08-23 09:53:33 -07:00
loader.py Use PEP 526 type annotations, add some type hints (#26464) 2019-09-07 09:48:58 +03:00
monkey_patch.py Black 2019-07-31 12:25:30 -07:00
package_constraints.txt Bump python-slugify to 3.0.4 (#26801) 2019-09-21 22:10:34 -07:00
requirements.py Use literal string interpolation in core (f-strings) (#26166) 2019-08-23 09:53:33 -07:00
setup.py Use literal string interpolation in core (f-strings) (#26166) 2019-08-23 09:53:33 -07:00