Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.xiaomi_miio.entity Namespace Reference

Classes

class  XiaomiCoordinatedMiioEntity
 
class  XiaomiGatewayDevice
 
class  XiaomiMiioEntity
 

Functions

def __init__ (self, device, entry, unique_id, coordinator)
 
def _extract_value_from_attribute (cls, state, attribute)
 
str _parse_datetime_datetime (datetime.datetime time)
 
str _parse_datetime_time (datetime.time initial_time)
 
int _parse_time_delta (datetime.timedelta timedelta)
 
def _try_command (self, mask_error, func, *args, **kwargs)
 
DeviceInfo device_info (self)
 
def unique_id (self)
 

Variables

bool _attr_has_entity_name = True
 
 _device
 
 _device_id
 
 _device_name
 
 _LOGGER = logging.getLogger(__name__)
 
 _mac
 
 _model
 
 _unique_id
 

Detailed Description

Code to handle a Xiaomi Device.

Function Documentation

◆ __init__()

def homeassistant.components.xiaomi_miio.entity.__init__ (   self,
  device,
  entry,
  unique_id,
  coordinator 
)
Initialize the coordinated Xiaomi Miio Device.

Definition at line 71 of file entity.py.

◆ _extract_value_from_attribute()

def homeassistant.components.xiaomi_miio.entity._extract_value_from_attribute (   cls,
  state,
  attribute 
)
private

Definition at line 117 of file entity.py.

◆ _parse_datetime_datetime()

str homeassistant.components.xiaomi_miio.entity._parse_datetime_datetime ( datetime.datetime  time)
staticprivate

Definition at line 149 of file entity.py.

◆ _parse_datetime_time()

str homeassistant.components.xiaomi_miio.entity._parse_datetime_time ( datetime.time  initial_time)
staticprivate

Definition at line 138 of file entity.py.

◆ _parse_time_delta()

int homeassistant.components.xiaomi_miio.entity._parse_time_delta ( datetime.timedelta  timedelta)
staticprivate

Definition at line 134 of file entity.py.

◆ _try_command()

def homeassistant.components.xiaomi_miio.entity._try_command (   self,
  mask_error,
  func,
args,
**  kwargs 
)
private
Call a miio device command handling error messages.

Definition at line 101 of file entity.py.

◆ device_info()

DeviceInfo homeassistant.components.xiaomi_miio.entity.device_info (   self)
Return the device info.

Definition at line 87 of file entity.py.

◆ unique_id()

def homeassistant.components.xiaomi_miio.entity.unique_id (   self)
Return an unique ID.

Definition at line 82 of file entity.py.

Variable Documentation

◆ _attr_has_entity_name

bool homeassistant.components.xiaomi_miio.entity._attr_has_entity_name = True
private
Representation of a base a coordinated Xiaomi Miio Entity.

Definition at line 69 of file entity.py.

◆ _device

homeassistant.components.xiaomi_miio.entity._device
private

Definition at line 74 of file entity.py.

◆ _device_id

homeassistant.components.xiaomi_miio.entity._device_id
private

Definition at line 77 of file entity.py.

◆ _device_name

homeassistant.components.xiaomi_miio.entity._device_name
private

Definition at line 78 of file entity.py.

◆ _LOGGER

homeassistant.components.xiaomi_miio.entity._LOGGER = logging.getLogger(__name__)
private

Definition at line 22 of file entity.py.

◆ _mac

homeassistant.components.xiaomi_miio.entity._mac
private

Definition at line 76 of file entity.py.

◆ _model

homeassistant.components.xiaomi_miio.entity._model
private

Definition at line 75 of file entity.py.

◆ _unique_id

homeassistant.components.xiaomi_miio.entity._unique_id
private

Definition at line 79 of file entity.py.