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

Public Member Functions

None __init__ (self, ShellyRpcCoordinator coordinator, str key)
 
None async_added_to_hass (self)
 
bool available (self)
 
Any call_rpc (self, str method, Any params)
 
dict status (self)
 
- Public Member Functions inherited from homeassistant.helpers.update_coordinator.CoordinatorEntity
None __init__ (self, _DataUpdateCoordinatorT coordinator, Any context=None)
 
None async_update (self)
 
- Public Member Functions inherited from homeassistant.components.shelly.coordinator.ShellyRpcCoordinator
None __init__ (self, HomeAssistant hass, ShellyConfigEntry entry, RpcDevice device)
 
None async_device_online (self, str source)
 
None async_setup (self, list[Platform]|None pending_platforms=None)
 
CALLBACK_TYPE async_subscribe_events (self, Callable[[dict[str, Any]], None] event_callback)
 
CALLBACK_TYPE async_subscribe_input_events (self, Callable[[dict[str, Any]], None] input_event_callback)
 
CALLBACK_TYPE async_subscribe_ota_events (self, Callable[[dict[str, Any]], None] ota_event_callback)
 
None shutdown (self)
 
bool update_sleep_period (self)
 

Public Attributes

 key
 
- Public Attributes inherited from homeassistant.components.shelly.coordinator.ShellyRpcCoordinator
 connected
 
 entry
 
 last_update_success
 
 update_interval
 

Private Member Functions

None _update_callback (self)
 

Private Attributes

 _attr_device_info
 
 _attr_name
 
 _attr_unique_id
 

Detailed Description

Helper class to represent a rpc entity.

Definition at line 348 of file entity.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.shelly.entity.ShellyRpcEntity.__init__ (   self,
ShellyRpcCoordinator  coordinator,
str  key 
)
Initialize Shelly entity.

Definition at line 351 of file entity.py.

Member Function Documentation

◆ _update_callback()

None homeassistant.components.shelly.entity.ShellyRpcEntity._update_callback (   self)
private
Handle device update.

Definition at line 380 of file entity.py.

◆ async_added_to_hass()

None homeassistant.components.shelly.entity.ShellyRpcEntity.async_added_to_hass (   self)

◆ available()

bool homeassistant.components.shelly.entity.ShellyRpcEntity.available (   self)
Check if device is available and initialized or sleepy.

Reimplemented from homeassistant.helpers.update_coordinator.CoordinatorEntity.

Reimplemented in homeassistant.components.shelly.entity.ShellyRpcAttributeEntity.

Definition at line 362 of file entity.py.

◆ call_rpc()

Any homeassistant.components.shelly.entity.ShellyRpcEntity.call_rpc (   self,
str  method,
Any  params 
)
Call RPC method.

Definition at line 384 of file entity.py.

◆ status()

dict homeassistant.components.shelly.entity.ShellyRpcEntity.status (   self)
Device status by entity key.

Definition at line 370 of file entity.py.

Member Data Documentation

◆ _attr_device_info

homeassistant.components.shelly.entity.ShellyRpcEntity._attr_device_info
private

Definition at line 355 of file entity.py.

◆ _attr_name

homeassistant.components.shelly.entity.ShellyRpcEntity._attr_name
private

Definition at line 359 of file entity.py.

◆ _attr_unique_id

homeassistant.components.shelly.entity.ShellyRpcEntity._attr_unique_id
private

Definition at line 358 of file entity.py.

◆ key

homeassistant.components.shelly.entity.ShellyRpcEntity.key

Definition at line 354 of file entity.py.


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