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

Public Member Functions

None __init__ (self, SwitchbotDataUpdateCoordinator coordinator)
 
None async_added_to_hass (self)
 
None async_update (self)
 
Mapping[Any, Any] extra_state_attributes (self)
 
dict[str, Any] parsed_data (self)
 
- Public Member Functions inherited from homeassistant.components.switchbot.coordinator.SwitchbotDataUpdateCoordinator
None __init__ (self, HomeAssistant hass, logging.Logger logger, BLEDevice ble_device, switchbot.SwitchbotDevice device, str base_unique_id, str device_name, bool connectable, SwitchbotModel model)
 
bool async_wait_ready (self)
 
- Public Member Functions inherited from homeassistant.components.bluetooth.active_update_coordinator.ActiveBluetoothDataUpdateCoordinator
None __init__ (self, HomeAssistant hass, logging.Logger logger, *str address, BluetoothScanningMode mode, Callable[[BluetoothServiceInfoBleak, float|None], bool] needs_poll_method, Callable[[BluetoothServiceInfoBleak], Coroutine[Any, Any, _T],]|None poll_method=None, Debouncer[Coroutine[Any, Any, None]]|None poll_debouncer=None, bool connectable=True)
 
bool needs_poll (self, BluetoothServiceInfoBleak service_info)
 
- Public Member Functions inherited from homeassistant.components.bluetooth.passive_update_coordinator.PassiveBluetoothDataUpdateCoordinator
None __init__ (self, HomeAssistant hass, logging.Logger logger, str address, BluetoothScanningMode mode, bool connectable=False)
 
Callable[[], None] async_add_listener (self, CALLBACK_TYPE update_callback, Any context=None)
 
Generator[Any] async_contexts (self)
 
None async_update_listeners (self)
 
bool available (self)
 
- Public Member Functions inherited from homeassistant.components.bluetooth.update_coordinator.BasePassiveBluetoothCoordinator
CALLBACK_TYPE async_start (self)
 
float last_seen (self)
 
str name (self)
 

Private Member Functions

None _async_update_attrs (self)
 
None _handle_coordinator_update (self)
 

Private Attributes

 _address
 
 _attr_device_info
 
 _attr_unique_id
 
 _device
 

Static Private Attributes

bool _attr_has_entity_name = True
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.components.switchbot.coordinator.SwitchbotDataUpdateCoordinator
 base_unique_id
 
 ble_device
 
 device
 
 device_name
 
 model
 
- Public Attributes inherited from homeassistant.components.bluetooth.active_update_coordinator.ActiveBluetoothDataUpdateCoordinator
 data
 
 last_poll_successful
 
- Public Attributes inherited from homeassistant.components.bluetooth.update_coordinator.BasePassiveBluetoothCoordinator
 address
 
 connectable
 
 hass
 
 logger
 
 mode
 

Detailed Description

Generic entity encapsulating common features of Switchbot device.

Definition at line 26 of file entity.py.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ _async_update_attrs()

None homeassistant.components.switchbot.entity.SwitchbotEntity._async_update_attrs (   self)
private
Update the entity attributes.

Reimplemented in homeassistant.components.switchbot.lock.SwitchBotLock, and homeassistant.components.switchbot.light.SwitchbotLightEntity.

Definition at line 69 of file entity.py.

◆ _handle_coordinator_update()

None homeassistant.components.switchbot.entity.SwitchbotEntity._handle_coordinator_update (   self)
private

◆ async_added_to_hass()

None homeassistant.components.switchbot.entity.SwitchbotEntity.async_added_to_hass (   self)

◆ async_update()

None homeassistant.components.switchbot.entity.SwitchbotEntity.async_update (   self)
Update the entity.

Only used by the generic entity update service.

Definition at line 83 of file entity.py.

◆ extra_state_attributes()

Mapping[Any, Any] homeassistant.components.switchbot.entity.SwitchbotEntity.extra_state_attributes (   self)
Return the state attributes.

Reimplemented in homeassistant.components.switchbot.switch.SwitchBotSwitch.

Definition at line 64 of file entity.py.

◆ parsed_data()

dict[str, Any] homeassistant.components.switchbot.entity.SwitchbotEntity.parsed_data (   self)
Return parsed device data for this entity.

Definition at line 59 of file entity.py.

Member Data Documentation

◆ _address

homeassistant.components.switchbot.entity.SwitchbotEntity._address
private

Definition at line 39 of file entity.py.

◆ _attr_device_info

homeassistant.components.switchbot.entity.SwitchbotEntity._attr_device_info
private

Definition at line 41 of file entity.py.

◆ _attr_has_entity_name

bool homeassistant.components.switchbot.entity.SwitchbotEntity._attr_has_entity_name = True
staticprivate

Definition at line 32 of file entity.py.

◆ _attr_unique_id

homeassistant.components.switchbot.entity.SwitchbotEntity._attr_unique_id
private

Definition at line 40 of file entity.py.

◆ _device

homeassistant.components.switchbot.entity.SwitchbotEntity._device
private

Definition at line 37 of file entity.py.


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