Created
December 17, 2018 07:22
-
-
Save jschlyter/ac49bda4b8aff9f08180712ecf2cf435 to your computer and use it in GitHub Desktop.
Twinkly scripts for Home Assistant
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
# https://xled-docs.readthedocs.io/en/latest/msqtt_api.html | |
twinkle: | |
alias: Twinkle | |
sequence: | |
- service: script.twinkle_effect | |
data_template: | |
id: "{{id}}" | |
effect: "{{effect1}}" | |
- delay: | |
seconds: 5 | |
- service: script.twinkle_effect | |
data_template: | |
id: "{{id}}" | |
effect: "{{effect2}}" | |
twinkle_switch: | |
alias: Set twinkle switch | |
sequence: | |
- service: mqtt.publish | |
data_template: | |
topic: "xled/command/{{id}}" | |
payload: '{"command": "switch{{"on" if state else "off"}}"}' | |
twinkle_effect: | |
alias: Select twinkle effect | |
sequence: | |
- service: mqtt.publish | |
data_template: | |
topic: "xled/command/{{id}}" | |
payload: '{"command": "set{{effect}}"}' | |
twinkly_on: | |
alias: 'Twinkly on' | |
sequence: | |
- service: script.twinkle_switch | |
data: | |
id: MAC_OF_TWINKLY | |
state: true | |
twinkly_off: | |
alias: 'Twinkly off' | |
sequence: | |
- service: script.twinkle_switch | |
data: | |
id: MAC_OF_TWINKLY | |
state: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment