Skip to content

Instantly share code, notes, and snippets.

@blakadder
Created February 18, 2021 12:12
Show Gist options
  • Save blakadder/ac770b62926778ce63ff4b979394ba54 to your computer and use it in GitHub Desktop.
Save blakadder/ac770b62926778ce63ff4b979394ba54 to your computer and use it in GitHub Desktop.
name: '%topic% Heater'
power_command_topic: "cmnd/%topic%/power1"
mode_state_topic: "tele/%topic%/STATE"
mode_state_template: "{%set m=value_json.POWER1%}{%if m=='OFF'%}off{%elif m=='ON'%}heat{%else%}Unknown{%endif%}"
modes:
- heat
- off
fan_mode_command_topic: "cmnd/%topic%/event"
fan_mode_state_topic: "%topic%/mode"
fan_modes:
- off
- low
- high
temperature_command_topic: "cmnd/%topic%/dimmer"
temperature_state_topic: "tele/%topic%/STATE"
temperature_state_template: "{{value_json.Dimmer}}"
max_temp: 32
current_temperature_topic: "tele/%topic%/SENSOR"
current_temperature_template: "{{value_json['TuyaSNS']['Temperature']}}"
avty_t: tele/%topic%/LWT
pl_avail: Online
pl_not_avail: Offline
unique_id: '%macaddr%_heater'
device:
connections:
- - mac
- '%macaddr%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment