Files
zorruno-homeassistant/packages/bedroom_3_led_actions.yaml
T
2026-07-24 18:55:12 +12:00

48 lines
1.5 KiB
YAML

#:########################################################################################:#
# Package: Bedroom 3 Window LED Actions
# File: bedroom_3_led_actions.yaml
# Version: v1.0.0
# Date: 2023-10-20
#
# Purpose:
# Provides a selectable control for publishing Bedroom 3 window LED commands
# to the household MQTT command topic.
#
# Behaviour:
# - The Off option publishes the off command.
# - The 1 Hour Fade option publishes the fade_1 command.
# - The placeholder option preserves the neutral selector state.
#
# Dependencies:
# - Home Assistant MQTT integration and broker connectivity.
# - An external MQTT consumer for the Bedroom 3 window LED action topic.
#
# Version History:
# - v1.0.0 (2023-10-20): Initial Bedroom 3 window LED action package.
#:########################################################################################:#
input_select:
bedroom_3_led_actions:
icon: mdi:led-strip
name: Bedroom 3 LED Controls
initial: "----"
options:
- "----"
- "Off"
- "1 Hour Fade"
automation:
- id: set_the_bedroom_3_led_actions
alias: Set the Bedroom 3 LED Actions
trigger:
entity_id: input_select.bedroom_3_led_actions
platform: state
action:
service: mqtt.publish
data:
topic: viewroad-commands/bedroom3controls/windowledactions
payload:
'{% set mapping = { "----":"----", "Off":"off", "1 Hour Fade":"fade_1" } %} {% set dta = trigger.to_state.state %}
{{ mapping[dta] }}
'