forked from aiolos/ESPHome-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecofan.yaml
41 lines (41 loc) · 1.03 KB
/
ecofan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## With using mqtt in ESPEasy, the following config can be used in HA to control the Itho
## Topics depend on your MQTT-settings in ESPEasy
- platform: mqtt
name: Ecofan
command_topic: "ESP/Itho/cmd"
state_topic: "ESP/Itho/Itho/State"
state_value_template: "{% if value|float==0 %}State 0{% endif %}{% if value|float >0 %}State 1{% endif %}"
payload_off: "State 0"
payload_on: "State 1"
preset_modes:
- "off"
- "low"
- "medium"
- "high"
- "full"
preset_mode_command_topic: "ITHO/fan/cmd"
preset_mode_command_template: >
{% if value == 'low' %}
State 1
{% elif value == 'medium' %}
State 2
{% elif value == 'high' %}
State 3
{% elif value == 'full' %}
State 4
{% else %}
State 0
{% endif %}
preset_mode_state_topic: "ESP/Itho/Itho/State"
preset_mode_value_template: >
{% if value == '1' %}
low
{% elif value == '2' %}
medium
{% elif value == '3' %}
high
{% elif value == '4' %}
full
{% else %}
off
{% endif %}