* Fix emulated_hue brightness off by one
Hue uses a max brightness of 254, Home Assistant
uses a max brightness of 255. Values > 127 were
off by one.
* use constant
* fix test
* add debug
* Revert "add debug"
This reverts commit 242220a02e.
* emulated_hue: Optimize is_entity_exposed
Switch all list transversals in is_entity_exposed to
hash lookups
get_deprecated is now only called if explict_expose is
set
This funciton was iterating multiple lists per enitity
every time there was an update. It was responsible for
a chunk of execution time when there are large number
of entities in home assistant.
* Complete deprecation of ATTR_EMULATED_HUE attribute
* Complete deprecation of ATTR_EMULATED_HUE attribute (remove const)
* Remove ATTR_EMULATED_HUE_HIDDEN and Rewrite tests
* Use f-strings in integrations starting with B
* Use f-strings in integrations starting with C
* Use f-strings in integrations starting with D
* Use f-strings in integrations starting with E
* Fix pylint errors
* Fix pylint errors v2
* Fix tests
* Fix tests v2
* Fix light.turn_on for emulated_hue
HarmonyHub sends `{'xy': [0, 0], 'on': True, 'bri': 0}` when turning on lights that do not support brightness control. Unfortunately current logic always uses brightness value to control on/off state which makes no sense for lights that don't support brightness at all. This change fixes that behavior, making light without brightness control usable with HarmonyHub and probably some other remotes.
* Test 'no_brightness' lights
If an entity is in unavailable state in HA, we expose this
as unreachable to Hue clients. This helps when troubleshooting
Hue issues because you can now receive feedback if there is an issue
on the HA side.
* [Hue API] Add color support
Adds color support to the hue api (specifically hue/saturation). Switched from using a tuple to convey state internally to using a dict to make adding new fields easier.
* [Hue API] Add unit test for color support
* set cover level using emulated_hue
* changed mapping for service turn_on/off for cover.
* removed whitespace for the sake of hound
* using const for domains instead of hardcoded strings.
* change length of lines for the sake of hound
* fixed under-intended line
* changed intent for the sake of hound
* Move more constants to const.py
* Import constants directly from const
* ATTR_ENTITY_ID is not defined in media_player
* MEDIA_PLAYER_PLAY_MEDIA_SCHEMA is still in __init__.py
* Correct imports in tts
* PLATFORM_SCHEMA, SCHEMA is still defined in __init__.py
* Pandora imports several services
* Some additional fixes for move of const in media_player
* Fix hound lengths
## Description:
More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).
## Checklist:
- [ ] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**