Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.lg_thinq.entity.ThinQEntity Class Reference
Inheritance diagram for homeassistant.components.lg_thinq.entity.ThinQEntity:
[legend]
Collaboration diagram for homeassistant.components.lg_thinq.entity.ThinQEntity:
[legend]

Public Member Functions

None __init__ (self, DeviceDataUpdateCoordinator coordinator, EntityDescription entity_description, str property_id)
 
None async_added_to_hass (self)
 
None async_call_api (self, Coroutine[Any, Any, Any] target, Callable[[], None]|None on_fail_method=None)
 
PropertyState data (self)
 
- Public Member Functions inherited from homeassistant.helpers.update_coordinator.CoordinatorEntity
None __init__ (self, _DataUpdateCoordinatorT coordinator, Any context=None)
 
None async_update (self)
 
bool available (self)
 
- Public Member Functions inherited from homeassistant.components.lg_thinq.coordinator.DeviceDataUpdateCoordinator
None __init__ (self, HomeAssistant hass, HABridge ha_bridge)
 
None handle_notification_message (self, str|None message)
 
None handle_update_status (self, dict[str, Any] status)
 
None refresh_status (self)
 
- Public Member Functions inherited from homeassistant.helpers.update_coordinator.DataUpdateCoordinator
None __init__ (self, HomeAssistant hass, logging.Logger logger, *config_entries.ConfigEntry|None|UndefinedType config_entry=UNDEFINED, str name, timedelta|None update_interval=None, Callable[[], Awaitable[_DataT]]|None update_method=None, Callable[[], Awaitable[None]]|None setup_method=None, Debouncer[Coroutine[Any, Any, None]]|None request_refresh_debouncer=None, bool always_update=True)
 
Callable[[], None] async_add_listener (self, CALLBACK_TYPE update_callback, Any context=None)
 
None async_config_entry_first_refresh (self)
 
Generator[Any] async_contexts (self)
 
None async_refresh (self)
 
None async_register_shutdown (self)
 
None async_request_refresh (self)
 
None async_set_update_error (self, Exception err)
 
None async_set_updated_data (self, _DataT data)
 
None async_shutdown (self)
 
None async_update_listeners (self)
 
timedelta|None update_interval (self)
 
None update_interval (self, timedelta|None value)
 

Public Attributes

 entity_description
 
 location
 
 property_id
 
- Public Attributes inherited from homeassistant.components.lg_thinq.coordinator.DeviceDataUpdateCoordinator
 api
 
 data
 
 device_id
 
 device_name
 
 sub_id
 
 unique_id
 
- Public Attributes inherited from homeassistant.helpers.update_coordinator.DataUpdateCoordinator
 always_update
 
 config_entry
 
 data
 
 hass
 
 last_exception
 
 last_update_success
 
 logger
 
 name
 
 setup_method
 
 update_interval
 
 update_method
 

Private Member Functions

str|None _get_unit_of_measurement (self, str|None unit)
 
None _handle_coordinator_update (self)
 
None _update_status (self)
 

Private Attributes

 _attr_device_info
 
 _attr_translation_key
 
 _attr_translation_placeholders
 
 _attr_unique_id
 

Static Private Attributes

bool _attr_has_entity_name = True
 

Detailed Description

The base implementation of all lg thinq entities.

Definition at line 33 of file entity.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.lg_thinq.entity.ThinQEntity.__init__ (   self,
DeviceDataUpdateCoordinator  coordinator,
EntityDescription  entity_description,
str  property_id 
)
Initialize an entity.

Definition at line 38 of file entity.py.

Member Function Documentation

◆ _get_unit_of_measurement()

str | None homeassistant.components.lg_thinq.entity.ThinQEntity._get_unit_of_measurement (   self,
str | None  unit 
)
private
Convert thinq unit string to HA unit string.

Definition at line 73 of file entity.py.

◆ _handle_coordinator_update()

None homeassistant.components.lg_thinq.entity.ThinQEntity._handle_coordinator_update (   self)
private
Handle updated data from the coordinator.

Definition at line 87 of file entity.py.

◆ _update_status()

◆ async_added_to_hass()

None homeassistant.components.lg_thinq.entity.ThinQEntity.async_added_to_hass (   self)
Call when entity is added to hass.

Definition at line 92 of file entity.py.

◆ async_call_api()

None homeassistant.components.lg_thinq.entity.ThinQEntity.async_call_api (   self,
Coroutine[Any, Any, Any]  target,
Callable[[], None] | None   on_fail_method = None 
)
Call the given api and handle exception.

Definition at line 97 of file entity.py.

◆ data()

PropertyState homeassistant.components.lg_thinq.entity.ThinQEntity.data (   self)
Return the state data of entity.

Definition at line 69 of file entity.py.

Member Data Documentation

◆ _attr_device_info

homeassistant.components.lg_thinq.entity.ThinQEntity._attr_device_info
private

Definition at line 51 of file entity.py.

◆ _attr_has_entity_name

bool homeassistant.components.lg_thinq.entity.ThinQEntity._attr_has_entity_name = True
staticprivate

Definition at line 36 of file entity.py.

◆ _attr_translation_key

homeassistant.components.lg_thinq.entity.ThinQEntity._attr_translation_key
private

Definition at line 64 of file entity.py.

◆ _attr_translation_placeholders

homeassistant.components.lg_thinq.entity.ThinQEntity._attr_translation_placeholders
private

Definition at line 63 of file entity.py.

◆ _attr_unique_id

homeassistant.components.lg_thinq.entity.ThinQEntity._attr_unique_id
private

Definition at line 57 of file entity.py.

◆ entity_description

homeassistant.components.lg_thinq.entity.ThinQEntity.entity_description

Definition at line 47 of file entity.py.

◆ location

homeassistant.components.lg_thinq.entity.ThinQEntity.location

Definition at line 49 of file entity.py.

◆ property_id

homeassistant.components.lg_thinq.entity.ThinQEntity.property_id

Definition at line 48 of file entity.py.


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