Created
May 7, 2020 22:30
-
-
Save Elwell/8b596595c4522ece724972136d92c67f to your computer and use it in GitHub Desktop.
Cheerlights into Mosquitto and Home assistant
This file contains 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: 'Cheerlights to GlowOrb' | |
trigger: | |
platform: mqtt | |
topic: cheerlightsRGB | |
action: | |
service_template: light.turn_on | |
data_template: | |
brightness_pct: 50 | |
rgb_color: | |
- "{{ trigger.payload[1:3] | int(0,16) }}" | |
- "{{ trigger.payload[3:5] | int(0,16) }}" | |
- "{{ trigger.payload[-2:] | int(0,16) }}" | |
entity_id: | |
- light.gloworb |
This file contains 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
sensor: | |
- platform: mqtt | |
state_topic: cheerlights | |
name: CheerLights | |
light: | |
- platform: mqtt | |
name: GlowOrb | |
availability_topic: "tele/tasmota_AC3516/LWT" | |
payload_available: "Online" | |
payload_not_available: "Offline" | |
command_topic: "cmnd/tasmota_AC3516/POWER" | |
state_topic: "tele/tasmota_AC3516/STATE" | |
state_value_template: "{{value_json.POWER}}" | |
payload_on: "ON" | |
payload_off: "OFF" | |
on_command_type: "brightness" | |
brightness_command_topic: "cmnd/tasmota_AC3516/Dimmer" | |
brightness_state_topic: "tele/tasmota_AC3516/STATE" | |
brightness_scale: 100 | |
brightness_value_template: "{{value_json.Dimmer}}" | |
rgb_command_topic: "cmnd/tasmota_AC3516/Color2" | |
rgb_state_topic: "tele/tasmota_AC3516/STATE" | |
rgb_value_template: "{{value_json.Color.split(',')[0:3]|join(',')}}" | |
effect_command_topic: "cmnd/tasmota_AC3516/Scheme" | |
effect_state_topic: "tele/tasmota_AC3516/STATE" | |
effect_value_template: "{{value_json.Scheme}}" | |
effect_list: | |
- 0 | |
- 1 | |
- 2 | |
- 3 | |
- 4 |
This file contains 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
connection cheerlights | |
address mqtt.cheerlights.com | |
topic cheerlights in | |
topic cheerlightsRGB in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment