forked from arendst/Tasmota
-
Notifications
You must be signed in to change notification settings - Fork 35
Fan Devices
digiblur edited this page Aug 26, 2019
·
1 revision
Edit the states.fan.master... line to your fan state once you deploy this config.
fan:
- platform: mqtt
name: "Master Fan"
command_topic: "cmnd/ifan02/FanSpeed"
speed_command_topic: "cmnd/ifan02/FanSpeed"
state_topic: "stat/ifan02/RESULT"
speed_state_topic: "stat/ifan02/RESULT"
state_value_template: >
{% if value_json.FanSpeed is defined %}
{% if value_json.FanSpeed == 0 -%}0{%- elif value_json.FanSpeed > 0 -%}2{%- endif %}
{% else %}
{% if states.fan.master_bedroom_fan.state == 'off' -%}0{%- elif states.fan.master_bedroom_fan.state == 'on' -%}2{%- endif %}
{% endif %}
speed_value_template: "{{ value_json.FanSpeed }}"
availability_topic: tele/ifan02/LWT
payload_off: "0"
payload_on: "2"
payload_low_speed: "1"
payload_medium_speed: "2"
payload_high_speed: "3"
payload_available: Online
payload_not_available: Offline
speeds:
- low
- medium
- high