Created
December 17, 2018 07:35
-
-
Save jschlyter/2af596135d5c15e2eb6a9c52454608eb to your computer and use it in GitHub Desktop.
Twinkly Home Assistent Switch
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
- platform: mqtt | |
name: twinkly | |
state_topic: "xled/appstatus/MAC_OF_TWINKLY" | |
command_topic: "xled/command/MAC_OF_TWINKLY" | |
available_topic: "xled/status/MAC_OF_TWINKLY" | |
payload_on: '{"command": "switchon"}' | |
payload_off: '{"command": "switchoff"}' | |
retain: true | |
value_template: | | |
{% if value_json.appstatus is defined %} | |
{{ "OFF" if value_json.appstatus=="off" else "ON" }} | |
{% elif value_json.status is defined %} | |
{{ value_json.status }} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment