Last active
June 23, 2019 19:36
-
-
Save AnthonMS/a18e912fca698cf6629acebdde54622a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- alias: Select Traffic light Effect | |
trigger: | |
platform: state | |
entity_id: input_select.traffic_light_effect | |
action: | |
service: mqtt.publish | |
data: | |
topic: "cmnd/SmartTrafficLight/switch" | |
payload_template: "{% if states.input_select.traffic_light_effect.state == 'Alle tændt' %} 1 {% elif states.input_select.traffic_light_effect.state == 'Omvendt alle tændt' %} 2 {% elif states.input_select.traffic_light_effect.state == 'Grøn' %} 3 {% elif states.input_select.traffic_light_effect.state == 'Gul' %} 4 {% elif states.input_select.traffic_light_effect.state == 'Rød' %} 5 {% elif states.input_select.traffic_light_effect.state == 'Alle loop' %} 6 {% elif states.input_select.traffic_light_effect.state == 'En loop' %} 7 {% elif states.input_select.traffic_light_effect.state == 'Almindelig trafiklys loop' %} 8 {% endif %}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment