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

Classes

class  AutomowerSensorEntity
 
class  AutomowerSensorEntityDescription
 
class  WorkAreaSensorEntity
 
class  WorkAreaSensorEntityDescription
 

Functions

Mapping[str, Any] _get_current_work_area_dict (MowerAttributes data)
 
str _get_current_work_area_name (MowerAttributes data)
 
str _get_error_string (MowerAttributes data)
 
list[str] _get_work_area_names (MowerAttributes data)
 
None async_setup_entry (HomeAssistant hass, AutomowerConfigEntry entry, AddEntitiesCallback async_add_entities)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_WORK_AREA_ID_ASSIGNMENT = "work_area_id_assignment"
 
list ERROR_KEY_LIST
 
dictionary ERROR_STATES
 
 list
 
string STATE_NO_WORK_AREA_ACTIVE = "no_work_area_active"
 

Detailed Description

Creates the sensor entities for the mower.

Function Documentation

◆ _get_current_work_area_dict()

Mapping[str, Any] homeassistant.components.husqvarna_automower.sensor._get_current_work_area_dict ( MowerAttributes  data)
private
Return the name of the current work area.

Definition at line 237 of file sensor.py.

◆ _get_current_work_area_name()

str homeassistant.components.husqvarna_automower.sensor._get_current_work_area_name ( MowerAttributes  data)
private
Return the name of the current work area.

Definition at line 226 of file sensor.py.

◆ _get_error_string()

str homeassistant.components.husqvarna_automower.sensor._get_error_string ( MowerAttributes  data)
private
Return the error key, if not provided the mower state or `no error`.

Definition at line 246 of file sensor.py.

◆ _get_work_area_names()

list[str] homeassistant.components.husqvarna_automower.sensor._get_work_area_names ( MowerAttributes  data)
private
Return a list with all work area names.

Definition at line 213 of file sensor.py.

◆ async_setup_entry()

None homeassistant.components.husqvarna_automower.sensor.async_setup_entry ( HomeAssistant  hass,
AutomowerConfigEntry  entry,
AddEntitiesCallback  async_add_entities 
)
Set up sensor platform.

Definition at line 428 of file sensor.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.husqvarna_automower.sensor._LOGGER = logging.getLogger(__name__)
private

Definition at line 37 of file sensor.py.

◆ ATTR_WORK_AREA_ID_ASSIGNMENT

string homeassistant.components.husqvarna_automower.sensor.ATTR_WORK_AREA_ID_ASSIGNMENT = "work_area_id_assignment"

Definition at line 39 of file sensor.py.

◆ ERROR_KEY_LIST

list homeassistant.components.husqvarna_automower.sensor.ERROR_KEY_LIST

Definition at line 41 of file sensor.py.

◆ ERROR_STATES

dictionary homeassistant.components.husqvarna_automower.sensor.ERROR_STATES
Initial value:
1 = {
2  MowerStates.ERROR,
3  MowerStates.ERROR_AT_POWER_UP,
4  MowerStates.FATAL_ERROR,
5 }

Definition at line 190 of file sensor.py.

◆ list

homeassistant.components.husqvarna_automower.sensor.list

Definition at line 196 of file sensor.py.

◆ STATE_NO_WORK_AREA_ACTIVE

string homeassistant.components.husqvarna_automower.sensor.STATE_NO_WORK_AREA_ACTIVE = "no_work_area_active"

Definition at line 209 of file sensor.py.