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

Public Member Functions

None __init__ (self, BondData data, BondDevice device, str|None sub_device=None, str|None sub_device_id=None)
 
None async_added_to_hass (self)
 
None async_update (self)
 
None async_will_remove_from_hass (self)
 
DeviceInfo device_info (self)
 
- 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)
 
bool available (self)
 
dict[str, Any]|None capability_attributes (self)
 
str|None device_class (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|None icon (self)
 
str|UndefinedType|None name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
StateType state (self)
 
dict[str, Any]|None state_attributes (self)
 
str|None suggested_object_id (self)
 
int|None supported_features (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

None _apply_state (self)
 
None _async_bpup_callback (self, dict json_msg)
 
None _async_schedule_bpup_alive_or_poll (self)
 
None _async_state_callback (self, dict state)
 
None _async_update (self)
 
None _async_update_from_api (self)
 
None _async_update_if_bpup_not_alive (self, datetime now)
 

Private Attributes

 _async_update_if_bpup_not_alive_job
 
 _attr_assumed_state
 
 _attr_available
 
 _attr_name
 
 _attr_unique_id
 
 _bond
 
 _bpup_polling_fallback
 
 _bpup_subs
 
 _device
 
 _device_id
 
 _hub
 
 _initialized
 
 _sub_device
 
 _update_lock
 

Static Private Attributes

bool _attr_should_poll = False
 

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.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Detailed Description

Generic Bond entity encapsulating common features of any Bond controlled device.

Definition at line 35 of file entity.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.bond.entity.BondEntity.__init__ (   self,
BondData  data,
BondDevice  device,
str | None   sub_device = None,
str | None   sub_device_id = None 
)
Initialize entity with API and device info.

Definition at line 40 of file entity.py.

Member Function Documentation

◆ _apply_state()

◆ _async_bpup_callback()

None homeassistant.components.bond.entity.BondEntity._async_bpup_callback (   self,
dict  json_msg 
)
private
Process a state change from BPUP.

Definition at line 173 of file entity.py.

◆ _async_schedule_bpup_alive_or_poll()

None homeassistant.components.bond.entity.BondEntity._async_schedule_bpup_alive_or_poll (   self)
private
Schedule the BPUP alive or poll.

Definition at line 189 of file entity.py.

◆ _async_state_callback()

None homeassistant.components.bond.entity.BondEntity._async_state_callback (   self,
dict  state 
)
private
Process a state change.

Definition at line 160 of file entity.py.

◆ _async_update()

None homeassistant.components.bond.entity.BondEntity._async_update (   self)
private
Fetch via the API.

Definition at line 136 of file entity.py.

◆ _async_update_from_api()

None homeassistant.components.bond.entity.BondEntity._async_update_from_api (   self)
private
Fetch via the API.

Definition at line 142 of file entity.py.

◆ _async_update_if_bpup_not_alive()

None homeassistant.components.bond.entity.BondEntity._async_update_if_bpup_not_alive (   self,
datetime  now 
)
private
Fetch via the API if BPUP is not alive.

Definition at line 115 of file entity.py.

◆ async_added_to_hass()

None homeassistant.components.bond.entity.BondEntity.async_added_to_hass (   self)
Subscribe to BPUP and start polling.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 182 of file entity.py.

◆ async_update()

None homeassistant.components.bond.entity.BondEntity.async_update (   self)
Perform a manual update from API.

Definition at line 110 of file entity.py.

◆ async_will_remove_from_hass()

None homeassistant.components.bond.entity.BondEntity.async_will_remove_from_hass (   self)
Unsubscribe from BPUP data on remove.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 198 of file entity.py.

◆ device_info()

DeviceInfo homeassistant.components.bond.entity.BondEntity.device_info (   self)
Get a an HA device representing this Bond controlled device.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 78 of file entity.py.

Member Data Documentation

◆ _async_update_if_bpup_not_alive_job

homeassistant.components.bond.entity.BondEntity._async_update_if_bpup_not_alive_job
private

Definition at line 73 of file entity.py.

◆ _attr_assumed_state

homeassistant.components.bond.entity.BondEntity._attr_assumed_state
private

Definition at line 70 of file entity.py.

◆ _attr_available

homeassistant.components.bond.entity.BondEntity._attr_available
private

Definition at line 54 of file entity.py.

◆ _attr_name

homeassistant.components.bond.entity.BondEntity._attr_name
private

Definition at line 67 of file entity.py.

◆ _attr_should_poll

bool homeassistant.components.bond.entity.BondEntity._attr_should_poll = False
staticprivate

Definition at line 38 of file entity.py.

◆ _attr_unique_id

homeassistant.components.bond.entity.BondEntity._attr_unique_id
private

Definition at line 64 of file entity.py.

◆ _bond

homeassistant.components.bond.entity.BondEntity._bond
private

Definition at line 50 of file entity.py.

◆ _bpup_polling_fallback

homeassistant.components.bond.entity.BondEntity._bpup_polling_fallback
private

Definition at line 192 of file entity.py.

◆ _bpup_subs

homeassistant.components.bond.entity.BondEntity._bpup_subs
private

Definition at line 55 of file entity.py.

◆ _device

homeassistant.components.bond.entity.BondEntity._device
private

Definition at line 51 of file entity.py.

◆ _device_id

homeassistant.components.bond.entity.BondEntity._device_id
private

Definition at line 52 of file entity.py.

◆ _hub

homeassistant.components.bond.entity.BondEntity._hub
private

Definition at line 49 of file entity.py.

◆ _initialized

homeassistant.components.bond.entity.BondEntity._initialized
private

Definition at line 57 of file entity.py.

◆ _sub_device

homeassistant.components.bond.entity.BondEntity._sub_device
private

Definition at line 53 of file entity.py.

◆ _update_lock

homeassistant.components.bond.entity.BondEntity._update_lock
private

Definition at line 56 of file entity.py.


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