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

Classes

class  RainCloudSwitch
 

Functions

None setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
list ALLOWED_WATERING_TIME = [5, 10, 15, 30, 45, 60]
 
string CONF_WATERING_TIME = "watering_minutes"
 
int DEFAULT_WATERING_TIME = 15
 
 PLATFORM_SCHEMA
 
list SWITCHES = ["auto_watering", "manual_watering"]
 

Detailed Description

Support for Melnor RainCloud sprinkler water timer.

Function Documentation

◆ setup_platform()

None homeassistant.components.raincloud.switch.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up a sensor for a raincloud device.

Definition at line 43 of file switch.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.raincloud.switch._LOGGER = logging.getLogger(__name__)
private

Definition at line 23 of file switch.py.

◆ ALLOWED_WATERING_TIME

list homeassistant.components.raincloud.switch.ALLOWED_WATERING_TIME = [5, 10, 15, 30, 45, 60]

Definition at line 25 of file switch.py.

◆ CONF_WATERING_TIME

string homeassistant.components.raincloud.switch.CONF_WATERING_TIME = "watering_minutes"

Definition at line 26 of file switch.py.

◆ DEFAULT_WATERING_TIME

int homeassistant.components.raincloud.switch.DEFAULT_WATERING_TIME = 15

Definition at line 27 of file switch.py.

◆ PLATFORM_SCHEMA

homeassistant.components.raincloud.switch.PLATFORM_SCHEMA
Initial value:
1 = SWITCH_PLATFORM_SCHEMA.extend(
2  {
3  vol.Optional(CONF_MONITORED_CONDITIONS, default=list(SWITCHES)): vol.All(
4  cv.ensure_list, [vol.In(SWITCHES)]
5  ),
6  vol.Optional(CONF_WATERING_TIME, default=DEFAULT_WATERING_TIME): vol.All(
7  vol.In(ALLOWED_WATERING_TIME)
8  ),
9  }
10 )

Definition at line 31 of file switch.py.

◆ SWITCHES

list homeassistant.components.raincloud.switch.SWITCHES = ["auto_watering", "manual_watering"]

Definition at line 29 of file switch.py.