Since we now base all of exposure checks on data that
will not change, we can cache the result instead
of calculating it every loop.
This change complements the work done in #32718
* Make emulated hue detectable by Busch-Jaeger free@home SysAP
* Emulated hue: Remove unnecessary host line from UPnP response
* Test that external IPs are blocked for config route
* Add another test for unauthorized users
* Change hue username to nouser
nouser seems to be used by the official Hue Bridge v1 Android app and is
used by other projects as well
Co-authored-by: J. Nick Koston <nick@koston.org>
* Return emulated hue id for update requests
* Emulated Hue: Rename function argument to match its content
* Use HTTP status consts throughout the test
* Use HTTP status consts in UPnP test
* 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