mirror of https://github.com/arendst/Tasmota.git
Updated Home Assistant (markdown)
parent
df1bf2aeb8
commit
1e29826d7d
|
@ -514,20 +514,20 @@ Modified by @finity69x2 in [Support for Ifan02 #2839](https://github.com/arendst
|
|||
|
||||
```yaml
|
||||
- platform: mqtt
|
||||
name: "Master Bedroom Fan"
|
||||
command_topic: "cmnd/sonoff_MBR_fan/FanSpeed"
|
||||
speed_command_topic: "cmnd/sonoff_MBR_fan/FanSpeed"
|
||||
state_topic: "stat/sonoff_MBR_fan/RESULT"
|
||||
speed_state_topic: "stat/sonoff_MBR_fan/RESULT"
|
||||
name: "Sonoff Fan"
|
||||
command_topic: "cmnd/sonoff_fan/FanSpeed"
|
||||
speed_command_topic: "cmnd/sonoff_fan/FanSpeed"
|
||||
state_topic: "stat/sonoff_fan/RESULT"
|
||||
speed_state_topic: "stat/sonoff_fan/RESULT"
|
||||
#state_value_template: "{% if value_json.FanSpeed == 0 -%}0{%- elif value_json.FanSpeed > 0 -%}4{%- endif %}"
|
||||
state_value_template: >
|
||||
{% if value_json.FanSpeed is defined %}
|
||||
{% if value_json.FanSpeed == 0 -%}0{%- elif value_json.FanSpeed > 0 -%}4{%- endif %}
|
||||
{% else %}
|
||||
{% if states.fan.master_bedroom_fan.state == 'off' -%}0{%- elif states.fan.master_bedroom_fan.state == 'on' -%}4{%- endif %}
|
||||
{% if states.fan.sonoff_fan.state == 'off' -%}0{%- elif states.fan.sonoff_fan.state == 'on' -%}4{%- endif %}
|
||||
{% endif %}
|
||||
speed_value_template: "{{ value_json.FanSpeed }}"
|
||||
availability_topic: tele/sonoff_MBR_fan/LWT
|
||||
availability_topic: tele/sonoff_fan/LWT
|
||||
payload_off: "0"
|
||||
payload_on: "4"
|
||||
payload_low_speed: "1"
|
||||
|
|
Loading…
Reference in New Issue