Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.lametric.switch Namespace Reference

Classes

class  LaMetricSwitchEntity
 
class  LaMetricSwitchEntityDescription
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)
 

Variables

list SWITCHES
 

Detailed Description

Support for LaMetric switches.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.lametric.switch.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry,
AddEntitiesCallback  async_add_entities 
)
Set up LaMetric switch based on a config entry.

Definition at line 44 of file switch.py.

Variable Documentation

◆ SWITCHES

list homeassistant.components.lametric.switch.SWITCHES
Initial value:
1 = [
2  LaMetricSwitchEntityDescription(
3  key="bluetooth",
4  translation_key="bluetooth",
5  entity_category=EntityCategory.CONFIG,
6  available_fn=lambda device: device.bluetooth.available,
7  is_on_fn=lambda device: device.bluetooth.active,
8  set_fn=lambda api, active: api.bluetooth(active=active),
9  ),
10 ]

Definition at line 32 of file switch.py.