Files
zorruno-homeassistant/packages/bedroom_3_led_actions.yaml
2023-10-20 13:27:48 +13:00

25 lines
662 B
YAML

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] }}
'