* Add conditions to trigger template entities * Add tests * Fix ruff error * Ruff * Apply suggestions from code review * Deduplicate * Tweak name used in debug message * Add and improve type annotations of modified code * Adjust typing * Adjust typing * Add typing and remove unused parameter * Adjust typing Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Adjust return type Co-authored-by: Martin Hjelmare <marhje52@gmail.com> --------- Co-authored-by: Erik Montnemery <erik@montnemery.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
40 lines
912 B
Python
40 lines
912 B
Python
"""Constants for the Template Platform Components."""
|
|
|
|
from homeassistant.const import Platform
|
|
|
|
CONF_ACTION = "action"
|
|
CONF_ATTRIBUTE_TEMPLATES = "attribute_templates"
|
|
CONF_ATTRIBUTES = "attributes"
|
|
CONF_AVAILABILITY = "availability"
|
|
CONF_AVAILABILITY_TEMPLATE = "availability_template"
|
|
CONF_CONDITION = "condition"
|
|
CONF_MAX = "max"
|
|
CONF_MIN = "min"
|
|
CONF_OBJECT_ID = "object_id"
|
|
CONF_PICTURE = "picture"
|
|
CONF_PRESS = "press"
|
|
CONF_STEP = "step"
|
|
CONF_TRIGGER = "trigger"
|
|
CONF_TURN_OFF = "turn_off"
|
|
CONF_TURN_ON = "turn_on"
|
|
|
|
DOMAIN = "template"
|
|
|
|
PLATFORM_STORAGE_KEY = "template_platforms"
|
|
|
|
PLATFORMS = [
|
|
Platform.ALARM_CONTROL_PANEL,
|
|
Platform.BINARY_SENSOR,
|
|
Platform.BUTTON,
|
|
Platform.COVER,
|
|
Platform.FAN,
|
|
Platform.IMAGE,
|
|
Platform.LIGHT,
|
|
Platform.LOCK,
|
|
Platform.NUMBER,
|
|
Platform.SELECT,
|
|
Platform.SENSOR,
|
|
Platform.SWITCH,
|
|
Platform.VACUUM,
|
|
Platform.WEATHER,
|
|
]
|