Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input_select:
- floodlight01_mode:
- name: Floodlight01
- options:
- - "Auto" # = 1
- - "Off" # = 0
- - "On" # = 2
- icon: mdi:target
- automation:
- - alias: "Set Thermostat Mode Selector"
- trigger:
- platform: mqtt
- topic: "stat/tasmota_38088B/DPTYPE4ID101"
- # entity_id: input_select.floodlight01_mode
- action:
- service: input_select.select_option
- target:
- entity_id: input_select.floodlight01_mode
- data:
- option: "{{ trigger.payload }}"
- # This automation script runs when the thermostat mode selector is changed.
- # It publishes its value to the same MQTT topic it is also subscribed to.
- - alias: "Set Floodlight01 Mode"
- trigger:
- platform: state
- entity_id: input_select.floodlight01_mode
- action:
- service: mqtt.publish
- data:
- topic: "cmnd/tasmota_38088B/TuyaSend4"
- retain: true
- payload: "101,{{ states('input_select.floodlight01_mode') }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement