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

Classes

class  MelnorSwitchEntityDescription
 
class  MelnorZoneSwitch
 

Functions

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

Variables

list ZONE_ENTITY_DESCRIPTIONS
 

Detailed Description

Switch support for Melnor Bluetooth water timer.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.melnor.switch.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up the switch platform.

Definition at line 52 of file switch.py.

Variable Documentation

◆ ZONE_ENTITY_DESCRIPTIONS

list homeassistant.components.melnor.switch.ZONE_ENTITY_DESCRIPTIONS
Initial value:
1 = [
2  MelnorSwitchEntityDescription(
3  device_class=SwitchDeviceClass.SWITCH,
4  key="manual",
5  translation_key="manual",
6  name=None,
7  on_off_fn=lambda valve, bool: valve.set_is_watering(bool),
8  state_fn=lambda valve: valve.is_watering,
9  ),
10  MelnorSwitchEntityDescription(
11  device_class=SwitchDeviceClass.SWITCH,
12  key="frequency",
13  translation_key="frequency",
14  on_off_fn=lambda valve, bool: valve.set_frequency_enabled(bool),
15  state_fn=lambda valve: valve.schedule_enabled,
16  ),
17 ]

Definition at line 33 of file switch.py.