Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.hyperion.light.HyperionLight Class Reference
Inheritance diagram for homeassistant.components.hyperion.light.HyperionLight:
[legend]
Collaboration diagram for homeassistant.components.hyperion.light.HyperionLight:
[legend]

Public Member Functions

None __init__ (self, str server_id, int instance_num, str instance_name, MappingProxyType[str, Any] options, client.HyperionClient hyperion_client)
 
None async_added_to_hass (self)
 
None async_turn_off (self, **Any kwargs)
 
None async_turn_on (self, **Any kwargs)
 
None async_will_remove_from_hass (self)
 
bool available (self)
 
int brightness (self)
 
str effect (self)
 
list[streffect_list (self)
 
tuple[float, float] hs_color (self)
 
str icon (self)
 
bool is_on (self)
 
- Public Member Functions inherited from homeassistant.components.light.LightEntity
dict[str, Any] capability_attributes (self)
 
ColorMode|str|None color_mode (self)
 
int|None color_temp (self)
 
int|None color_temp_kelvin (self)
 
int max_color_temp_kelvin (self)
 
int max_mireds (self)
 
int min_color_temp_kelvin (self)
 
int min_mireds (self)
 
tuple[int, int, int]|None rgb_color (self)
 
tuple[int, int, int, int]|None rgbw_color (self)
 
tuple[int, int, int, int, int]|None rgbww_color (self)
 
dict[str, Any]|None state_attributes (self)
 
set[ColorMode]|set[str]|None supported_color_modes (self)
 
LightEntityFeature supported_features (self)
 
LightEntityFeature supported_features_compat (self)
 
tuple[float, float]|None xy_color (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.ToggleEntity
None async_toggle (self, **Any kwargs)
 
Literal["on", "off"]|None state (self)
 
None toggle (self, **Any kwargs)
 
None turn_off (self, **Any kwargs)
 
None turn_on (self, **Any kwargs)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_internal_added_to_hass (self)
 
None async_internal_will_remove_from_hass (self)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_registry_entry_updated (self)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_write_ha_state (self)
 
str|None attribution (self)
 
str|None device_class (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
str|None entity_picture (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
Mapping[str, Any]|None extra_state_attributes (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|UndefinedType|None name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 

Private Member Functions

str _compute_unique_id (self, str server_id, int instance_num)
 
Any _get_option (self, str key)
 
dict[str, Any]|None _get_priority_entry_that_dictates_state (self)
 
None _set_internal_state (self, int|None brightness=None, Sequence[int]|None rgb_color=None, str|None effect=None)
 
None _update_adjustment (self, dict[str, Any]|None _=None)
 
None _update_client (self, dict[str, Any]|None _=None)
 
None _update_components (self, dict[str, Any]|None _=None)
 
None _update_effect_list (self, dict[str, Any]|None _=None)
 
None _update_full_state (self)
 
None _update_priorities (self, dict[str, Any]|None _=None)
 

Private Attributes

 _attr_device_info
 
 _attr_unique_id
 
 _brightness
 
 _client
 
 _device_id
 
 _effect
 
 _effect_list
 
 _instance_name
 
 _options
 
 _rgb_color
 

Static Private Attributes

 _attr_color_mode = ColorMode.HS
 
bool _attr_has_entity_name = True
 
 _attr_name = None
 
bool _attr_should_poll = False
 
dictionary _attr_supported_color_modes = {ColorMode.HS}
 
 _attr_supported_features = LightEntityFeature.EFFECT
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 
- Static Public Attributes inherited from homeassistant.components.light.LightEntity
 int
 
 LightEntityFeature
 
 None
 
- Static Public Attributes inherited from homeassistant.helpers.entity.ToggleEntity
 None
 
- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Detailed Description

A Hyperion light that acts as a client for the configured priority.

Definition at line 117 of file light.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.hyperion.light.HyperionLight.__init__ (   self,
str  server_id,
int  instance_num,
str  instance_name,
MappingProxyType[str, Any]  options,
client.HyperionClient  hyperion_client 
)
Initialize the light.

Definition at line 127 of file light.py.

Member Function Documentation

◆ _compute_unique_id()

str homeassistant.components.hyperion.light.HyperionLight._compute_unique_id (   self,
str  server_id,
int  instance_num 
)
private
Compute a unique id for this instance.

Definition at line 165 of file light.py.

◆ _get_option()

Any homeassistant.components.hyperion.light.HyperionLight._get_option (   self,
str  key 
)
private
Get a value from the provided options.

Definition at line 202 of file light.py.

◆ _get_priority_entry_that_dictates_state()

dict[str, Any] | None homeassistant.components.hyperion.light.HyperionLight._get_priority_entry_that_dictates_state (   self)
private
Get the relevant Hyperion priority entry to consider.

Definition at line 389 of file light.py.

◆ _set_internal_state()

None homeassistant.components.hyperion.light.HyperionLight._set_internal_state (   self,
int | None   brightness = None,
Sequence[int] | None   rgb_color = None,
str | None   effect = None 
)
private
Set the internal state.

Definition at line 275 of file light.py.

◆ _update_adjustment()

None homeassistant.components.hyperion.light.HyperionLight._update_adjustment (   self,
dict[str, Any] | None   _ = None 
)
private
Update Hyperion adjustments.

Definition at line 295 of file light.py.

◆ _update_client()

None homeassistant.components.hyperion.light.HyperionLight._update_client (   self,
dict[str, Any] | None   _ = None 
)
private
Update client connection state.

Definition at line 366 of file light.py.

◆ _update_components()

None homeassistant.components.hyperion.light.HyperionLight._update_components (   self,
dict[str, Any] | None   _ = None 
)
private
Update Hyperion components.

Definition at line 290 of file light.py.

◆ _update_effect_list()

None homeassistant.components.hyperion.light.HyperionLight._update_effect_list (   self,
dict[str, Any] | None   _ = None 
)
private
Update Hyperion effects.

Definition at line 328 of file light.py.

◆ _update_full_state()

None homeassistant.components.hyperion.light.HyperionLight._update_full_state (   self)
private
Update full Hyperion state.

Definition at line 347 of file light.py.

◆ _update_priorities()

None homeassistant.components.hyperion.light.HyperionLight._update_priorities (   self,
dict[str, Any] | None   _ = None 
)
private
Update Hyperion priorities.

Definition at line 309 of file light.py.

◆ async_added_to_hass()

None homeassistant.components.hyperion.light.HyperionLight.async_added_to_hass (   self)
Register callbacks when entity added to hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 370 of file light.py.

◆ async_turn_off()

None homeassistant.components.hyperion.light.HyperionLight.async_turn_off (   self,
**Any  kwargs 
)
Turn off the light i.e. clear the configured priority.

Reimplemented from homeassistant.helpers.entity.ToggleEntity.

Definition at line 268 of file light.py.

◆ async_turn_on()

None homeassistant.components.hyperion.light.HyperionLight.async_turn_on (   self,
**Any  kwargs 
)
Turn on the light.

Reimplemented from homeassistant.helpers.entity.ToggleEntity.

Definition at line 215 of file light.py.

◆ async_will_remove_from_hass()

None homeassistant.components.hyperion.light.HyperionLight.async_will_remove_from_hass (   self)
Cleanup prior to hass removal.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 385 of file light.py.

◆ available()

bool homeassistant.components.hyperion.light.HyperionLight.available (   self)
Return server availability.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 198 of file light.py.

◆ brightness()

int homeassistant.components.hyperion.light.HyperionLight.brightness (   self)
Return the brightness of this light between 0..255.

Reimplemented from homeassistant.components.light.LightEntity.

Definition at line 170 of file light.py.

◆ effect()

str homeassistant.components.hyperion.light.HyperionLight.effect (   self)
Return the current effect.

Reimplemented from homeassistant.components.light.LightEntity.

Definition at line 188 of file light.py.

◆ effect_list()

list[str] homeassistant.components.hyperion.light.HyperionLight.effect_list (   self)
Return the list of supported effects.

Reimplemented from homeassistant.components.light.LightEntity.

Definition at line 193 of file light.py.

◆ hs_color()

tuple[float, float] homeassistant.components.hyperion.light.HyperionLight.hs_color (   self)
Return last color value set.

Reimplemented from homeassistant.components.light.LightEntity.

Definition at line 175 of file light.py.

◆ icon()

str homeassistant.components.hyperion.light.HyperionLight.icon (   self)
Return state specific icon.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 180 of file light.py.

◆ is_on()

bool homeassistant.components.hyperion.light.HyperionLight.is_on (   self)
Return true if light is on. Light is considered on when there is a source at the configured HA priority.

Reimplemented from homeassistant.helpers.entity.ToggleEntity.

Definition at line 211 of file light.py.

Member Data Documentation

◆ _attr_color_mode

homeassistant.components.hyperion.light.HyperionLight._attr_color_mode = ColorMode.HS
staticprivate

Definition at line 122 of file light.py.

◆ _attr_device_info

homeassistant.components.hyperion.light.HyperionLight._attr_device_info
private

Definition at line 157 of file light.py.

◆ _attr_has_entity_name

bool homeassistant.components.hyperion.light.HyperionLight._attr_has_entity_name = True
staticprivate

Definition at line 120 of file light.py.

◆ _attr_name

homeassistant.components.hyperion.light.HyperionLight._attr_name = None
staticprivate

Definition at line 121 of file light.py.

◆ _attr_should_poll

bool homeassistant.components.hyperion.light.HyperionLight._attr_should_poll = False
staticprivate

Definition at line 123 of file light.py.

◆ _attr_supported_color_modes

dictionary homeassistant.components.hyperion.light.HyperionLight._attr_supported_color_modes = {ColorMode.HS}
staticprivate

Definition at line 124 of file light.py.

◆ _attr_supported_features

homeassistant.components.hyperion.light.HyperionLight._attr_supported_features = LightEntityFeature.EFFECT
staticprivate

Definition at line 125 of file light.py.

◆ _attr_unique_id

homeassistant.components.hyperion.light.HyperionLight._attr_unique_id
private

Definition at line 136 of file light.py.

◆ _brightness

homeassistant.components.hyperion.light.HyperionLight._brightness
private

Definition at line 283 of file light.py.

◆ _client

homeassistant.components.hyperion.light.HyperionLight._client
private

Definition at line 140 of file light.py.

◆ _device_id

homeassistant.components.hyperion.light.HyperionLight._device_id
private

Definition at line 137 of file light.py.

◆ _effect

homeassistant.components.hyperion.light.HyperionLight._effect
private

Definition at line 287 of file light.py.

◆ _effect_list

homeassistant.components.hyperion.light.HyperionLight._effect_list
private

Definition at line 341 of file light.py.

◆ _instance_name

homeassistant.components.hyperion.light.HyperionLight._instance_name
private

Definition at line 138 of file light.py.

◆ _options

homeassistant.components.hyperion.light.HyperionLight._options
private

Definition at line 139 of file light.py.

◆ _rgb_color

homeassistant.components.hyperion.light.HyperionLight._rgb_color
private

Definition at line 285 of file light.py.


The documentation for this class was generated from the following file: