Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the Template Platform Components."""
2 
3 from homeassistant.components.blueprint import BLUEPRINT_SCHEMA
4 from homeassistant.const import Platform
5 from homeassistant.helpers.typing import ConfigType
6 
7 CONF_ACTION = "action"
8 CONF_ATTRIBUTE_TEMPLATES = "attribute_templates"
9 CONF_ATTRIBUTES = "attributes"
10 CONF_AVAILABILITY = "availability"
11 CONF_AVAILABILITY_TEMPLATE = "availability_template"
12 CONF_CONDITION = "condition"
13 CONF_MAX = "max"
14 CONF_MIN = "min"
15 CONF_OBJECT_ID = "object_id"
16 CONF_PICTURE = "picture"
17 CONF_PRESS = "press"
18 CONF_STEP = "step"
19 CONF_TRIGGER = "trigger"
20 CONF_TURN_OFF = "turn_off"
21 CONF_TURN_ON = "turn_on"
22 
23 DOMAIN = "template"
24 
25 PLATFORM_STORAGE_KEY = "template_platforms"
26 
27 PLATFORMS = [
28  Platform.ALARM_CONTROL_PANEL,
29  Platform.BINARY_SENSOR,
30  Platform.BUTTON,
31  Platform.COVER,
32  Platform.FAN,
33  Platform.IMAGE,
34  Platform.LIGHT,
35  Platform.LOCK,
36  Platform.NUMBER,
37  Platform.SELECT,
38  Platform.SENSOR,
39  Platform.SWITCH,
40  Platform.VACUUM,
41  Platform.WEATHER,
42 ]
43 
44 TEMPLATE_BLUEPRINT_SCHEMA = BLUEPRINT_SCHEMA
45 
46 
48  """Dummy class to allow adding attributes."""
49 
50  raw_config: ConfigType | None = None
51  raw_blueprint_inputs: ConfigType | None = None