the two device_state_attributes don't return the current actual state (fan on/off, heat/cool), but rather the mode of the fan or thermostat (generally auto). As such this change makes the actual current state visible to the system, so you can do stuff when the fan turns on, for example. I suspect this is just a bug, but maybe it was intended NOT to be able to see the actual fan state?
* Add Smart Alarm Component
* Lint fixes
* Update coverage
* Update coverage with the correct file name
* PR Fixes. Update client version (to include timeouts). Cleaned up clien tcreation and improved authentication failure error. Added state map to replace nasty if blocks.
* PR Fixes. Update client version (to include timeouts). Cleaned up clien tcreation and improved authentication failure error. Added state map to replace nasty if blocks.
* Remove test file added in error.
* PR Fixes
* code not working
* did it all all at once
* removing debug stuff
* fixing lint issues
* fixing lint issues
* I am blind
* I felt small(80 by somthing) was to small, especily with lovelace
* fixing silly mistake
* this shouldnt be here
* made some changes
* corrrected client_id
* corrrected client_id
* less returns needed
* Fixing Small bugs and making stuff snake case
* Tweaking
* Added error handling for sense API timeouts
* Moved imports in function
* Moved imports to more appropriate function
* Change exception to custom package version
* Updated sense_energy library to 0.4.2
* fixed median was based on 1.5 minute interval, not 1 hour
* ignore median and set state from first value, when previous state was None
* update before add, removed unused 'retries' and 'ble_timeout', check if platform ready
* added missing blank line
* fixed too long line
* using modern python 3.5 features, changed comment to be less verbose
* continuation line fix
* removed DEFAULT_SCAN_INTERVAL in favor of existing SCAN_INTERVAL
* implement correct state for rflink cover
* Fix linting error
* invert logic as local testing pointed out it should be reversed
* add period at the end to satisfy the linter
* New service to load new devices from deCONZ without restarting HASS
* Do not use len to check if list is empty
* Add support for scenes to be updated as well
* Rework refresh devices method
* Fix test
* Test
* Ability to remove device
* Don't remove devices, instead remove config entry from device and entity registries
* Remove print
* Remove is not the same as unload
* Add tests
* Fix hound comment
* Add support for older Envoy models
* Stop requiring envoy model name in config
* Update to envoy_reader0.2
* Minor formatting fixes
* run script/gen_requirements_all.py
* Minor formatting fixes
* Change some strings to constants, use getattr to call function