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

Classes

class  HomeKitBatterySensor
 
class  HomeKitCarbonDioxideSensor
 
class  HomeKitHumiditySensor
 
class  HomeKitLightSensor
 
class  HomeKitSensor
 
class  HomeKitSensorEntityDescription
 
class  HomeKitTemperatureSensor
 
class  RSSISensor
 
class  SimpleSensor
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 
str thread_node_capability_to_str (Characteristic char)
 
str thread_status_to_str (Characteristic char)
 

Variables

dictionary ENTITY_TYPES
 
dictionary REQUIRED_CHAR_BY_TYPE
 

Detailed Description

Support for Homekit sensors.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.homekit_controller.sensor.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up Homekit sensors.

Definition at line 640 of file sensor.py.

◆ thread_node_capability_to_str()

str homeassistant.components.homekit_controller.sensor.thread_node_capability_to_str ( Characteristic  char)
Return the thread device type as a string.

The underlying value is a bitmask, but we want to turn that to
a human readable string. Some devices will have multiple capabilities.
For example, an NL55 is SLEEPY | MINIMAL. In that case we return the
"best" capability.

https://openthread.io/guides/thread-primer/node-roles-and-types

Definition at line 64 of file sensor.py.

◆ thread_status_to_str()

str homeassistant.components.homekit_controller.sensor.thread_status_to_str ( Characteristic  char)
Return the thread status as a string.

The underlying value is a bitmask, but we want to turn that to
a human readable string. So we check the flags in order. E.g. BORDER_ROUTER implies
ROUTER, so its more important to show that value.

Definition at line 101 of file sensor.py.

Variable Documentation

◆ ENTITY_TYPES

dictionary homeassistant.components.homekit_controller.sensor.ENTITY_TYPES
Initial value:
1 = {
2  ServicesTypes.HUMIDITY_SENSOR: HomeKitHumiditySensor,
3  ServicesTypes.TEMPERATURE_SENSOR: HomeKitTemperatureSensor,
4  ServicesTypes.LIGHT_SENSOR: HomeKitLightSensor,
5  ServicesTypes.CARBON_DIOXIDE_SENSOR: HomeKitCarbonDioxideSensor,
6  ServicesTypes.BATTERY_SERVICE: HomeKitBatterySensor,
7 }

Definition at line 582 of file sensor.py.

◆ REQUIRED_CHAR_BY_TYPE

dictionary homeassistant.components.homekit_controller.sensor.REQUIRED_CHAR_BY_TYPE
Initial value:
1 = {
2  ServicesTypes.BATTERY_SERVICE: CharacteristicsTypes.BATTERY_LEVEL,
3 }

Definition at line 591 of file sensor.py.