Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.tplink_omada.sensor Namespace Reference

Classes

class  OmadaDeviceSensor
 
class  OmadaDeviceSensorEntityDescription
 

Functions

str|None _map_device_status (OmadaListDevice device)
 
None async_setup_entry (HomeAssistant hass, OmadaConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 

Variables

dictionary DEVICE_STATUS_CATEGORY_MAP
 
dictionary DEVICE_STATUS_MAP
 

Detailed Description

Support for TPLink Omada binary sensors.

Function Documentation

◆ _map_device_status()

str | None homeassistant.components.tplink_omada.sensor._map_device_status ( OmadaListDevice  device)
private
Map the API device status to the best available descriptive device status.

Definition at line 49 of file sensor.py.

◆ async_setup_entry()

None homeassistant.components.tplink_omada.sensor.async_setup_entry ( HomeAssistant  hass,
OmadaConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up sensors.

Definition at line 57 of file sensor.py.

Variable Documentation

◆ DEVICE_STATUS_CATEGORY_MAP

dictionary homeassistant.components.tplink_omada.sensor.DEVICE_STATUS_CATEGORY_MAP
Initial value:
1 = {
2  DeviceStatusCategory.DISCONNECTED: OmadaDeviceStatus.DISCONNECTED,
3  DeviceStatusCategory.CONNECTED: OmadaDeviceStatus.CONNECTED,
4  DeviceStatusCategory.PENDING: OmadaDeviceStatus.PENDING,
5  DeviceStatusCategory.HEARTBEAT_MISSED: OmadaDeviceStatus.HEARTBEAT_MISSED,
6  DeviceStatusCategory.ISOLATED: OmadaDeviceStatus.ISOLATED,
7 }

Definition at line 40 of file sensor.py.

◆ DEVICE_STATUS_MAP

dictionary homeassistant.components.tplink_omada.sensor.DEVICE_STATUS_MAP
Initial value:
1 = {
2  DeviceStatus.PROVISIONING: OmadaDeviceStatus.PENDING,
3  DeviceStatus.CONFIGURING: OmadaDeviceStatus.PENDING,
4  DeviceStatus.UPGRADING: OmadaDeviceStatus.PENDING,
5  DeviceStatus.REBOOTING: OmadaDeviceStatus.PENDING,
6  DeviceStatus.ADOPT_FAILED: OmadaDeviceStatus.ADOPT_FAILED,
7  DeviceStatus.ADOPT_FAILED_WIRELESS: OmadaDeviceStatus.ADOPT_FAILED,
8  DeviceStatus.MANAGED_EXTERNALLY: OmadaDeviceStatus.MANAGED_EXTERNALLY,
9  DeviceStatus.MANAGED_EXTERNALLY_WIRELESS: OmadaDeviceStatus.MANAGED_EXTERNALLY,
10 }

Definition at line 28 of file sensor.py.