Classes | |
| class | HueAllGroupsStateView |
| class | HueAllLightsStateView |
| class | HueConfigView |
| class | HueFullStateView |
| class | HueGroupView |
| class | HueOneLightChangeView |
| class | HueOneLightStateView |
| class | HueUnauthorizedUser |
| class | HueUsernameView |
Functions | |
| dict[str, Any] | _build_entity_state_dict (State entity) |
| None | _clamp_values (dict[str, Any] data) |
| str | _entity_unique_id (str entity_id) |
| bool | _hass_to_hue_state (State entity) |
| bool | _remote_is_allowed (str address) |
| dict[str, Any] | create_config_model (Config config, web.Request request) |
| dict[str, Any] | create_hue_success_response (str entity_number, str attr, str value) |
| dict[str, Any] | create_list_of_entities (Config config, web.Request request) |
| dict[str, Any] | get_entity_state_dict (Config config, State entity) |
| int | hass_to_hue_brightness (int value) |
| int | hue_brightness_to_hass (int value) |
| bool | state_supports_hue_brightness (State state, Iterable[ColorMode] color_modes) |
| dict[str, Any] | state_to_json (Config config, State state) |
| None | wait_for_state_change_or_timeout (core.HomeAssistant hass, str entity_id, float timeout) |
Support for a Hue API to control Home Assistant.
|
private |
Build a state dict for an entity.
Definition at line 681 of file hue_api.py.
|
private |
Clamp brightness, hue, saturation, and color temp to valid values.
Definition at line 736 of file hue_api.py.
|
private |
Return the emulated_hue unique id for the entity_id.
Definition at line 749 of file hue_api.py.
|
private |
Convert hass entity states to simple True/False on/off state for Hue.
Definition at line 903 of file hue_api.py.
|
private |
Check if remote address is allowed.
Definition at line 133 of file hue_api.py.
| dict[str, Any] homeassistant.components.emulated_hue.hue_api.create_config_model | ( | Config | config, |
| web.Request | request | ||
| ) |
Create a config resource.
Definition at line 870 of file hue_api.py.
| dict[str, Any] homeassistant.components.emulated_hue.hue_api.create_hue_success_response | ( | str | entity_number, |
| str | attr, | ||
| str | value | ||
| ) |
Create a success response for an attribute set on a light.
Definition at line 862 of file hue_api.py.
| dict[str, Any] homeassistant.components.emulated_hue.hue_api.create_list_of_entities | ( | Config | config, |
| web.Request | request | ||
| ) |
Create a list of all entities.
Definition at line 883 of file hue_api.py.
| dict[str, Any] homeassistant.components.emulated_hue.hue_api.get_entity_state_dict | ( | Config | config, |
| State | entity | ||
| ) |
Retrieve and convert state and brightness values for an entity.
Definition at line 637 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.hass_to_hue_brightness | ( | int | value | ) |
Convert hass brightness 0..255 to hue 1..254 scale.
Definition at line 898 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.hue_brightness_to_hass | ( | int | value | ) |
Convert hue brightness 1..254 to hass format 0..255.
Definition at line 893 of file hue_api.py.
| bool homeassistant.components.emulated_hue.hue_api.state_supports_hue_brightness | ( | State | state, |
| Iterable[ColorMode] | color_modes | ||
| ) |
Return True if the state supports brightness.
Definition at line 847 of file hue_api.py.
| dict[str, Any] homeassistant.components.emulated_hue.hue_api.state_to_json | ( | Config | config, |
| State | state | ||
| ) |
Convert an entity to its Hue bridge JSON representation.
Definition at line 759 of file hue_api.py.
| None homeassistant.components.emulated_hue.hue_api.wait_for_state_change_or_timeout | ( | core.HomeAssistant | hass, |
| str | entity_id, | ||
| float | timeout | ||
| ) |
Wait for an entity to change state.
Definition at line 908 of file hue_api.py.
|
private |
Definition at line 75 of file hue_api.py.
| dictionary homeassistant.components.emulated_hue.hue_api.DIMMABLE_SUPPORTED_FEATURES_BY_DOMAIN |
Definition at line 117 of file hue_api.py.
| dictionary homeassistant.components.emulated_hue.hue_api.ENTITY_FEATURES_BY_DOMAIN |
Definition at line 124 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_BRI = "bri" |
Definition at line 93 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_BRI_MAX = 254 |
Definition at line 104 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_BRI_MIN = 1 |
Definition at line 103 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_COLORMODE = "colormode" |
Definition at line 94 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_CT = "ct" |
Definition at line 97 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_CT_MAX = 500 |
Definition at line 110 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_CT_MIN = 153 |
Definition at line 109 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_EFFECT = "effect" |
Definition at line 99 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_HUE = "hue" |
Definition at line 95 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_HUE_MAX = 65535 |
Definition at line 106 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_HUE_MIN = 0 |
Definition at line 105 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_ON = "on" |
Definition at line 92 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_SAT = "sat" |
Definition at line 96 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_SAT_MAX = 254 |
Definition at line 108 of file hue_api.py.
| int homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_SAT_MIN = 0 |
Definition at line 107 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_TRANSITION = "transitiontime" |
Definition at line 100 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_STATE_XY = "xy" |
Definition at line 98 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.HUE_API_USERNAME = "nouser" |
Definition at line 112 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.STATE_BRIGHTNESS = "bri" |
Definition at line 83 of file hue_api.py.
| float homeassistant.components.emulated_hue.hue_api.STATE_CACHED_TIMEOUT = 2.0 |
Definition at line 81 of file hue_api.py.
| float homeassistant.components.emulated_hue.hue_api.STATE_CHANGE_WAIT_TIMEOUT = 5.0 |
Definition at line 79 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.STATE_COLOR_TEMP = "ct" |
Definition at line 87 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.STATE_COLORMODE = "colormode" |
Definition at line 84 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.STATE_HUE = "hue" |
Definition at line 85 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.STATE_SATURATION = "sat" |
Definition at line 86 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.STATE_TRANSITION = "tt" |
Definition at line 88 of file hue_api.py.
| string homeassistant.components.emulated_hue.hue_api.STATE_XY = "xy" |
Definition at line 89 of file hue_api.py.
| list homeassistant.components.emulated_hue.hue_api.UNAUTHORIZED_USER |
Definition at line 113 of file hue_api.py.