preset_mode_value_template: >
{% if value == '1' %}
low
{% elif value == '2' %}
medium
{% elif value == '3' %}
high
{% elif value == '4' %}
full
{% else %}
off
{% endif %}
Standby is still something to work on…
Which is solved by adding ‘off’ to the preset modes
Hi Cadster. im struggling to get it back to work. my previous mqtt worked fine. now it stops.
Im trying to get your code into my itho.yaml. but without success. Can you share what i need to recode?
If i copy your code into itho.yaml i get a error code.
command_topic: "ITHO/fan/cmd"
state_topic: "ITHO/fan/State"
preset_mode_command_topic: "ITHO/fan/cmd" # same as command_topic
preset_mode_state_topic: "ITHO/fan/State" # same as state_topic
or did you copy one at one … if your topics are different then you need to change that back to old line.
that was my fault in first place…
Good morning. thanks for the reply. I changed the topics and now i am on the good way i think.
What i have now:
sensor:
- platform: mqtt
name: Tijd
state_topic: "ITHO/Fan/Timer"
value_template: "{{value}}"
unit_of_measurement: 's'
- platform: mqtt
name : Snelheid
state_topic: "ITHO/Fan/State"
value_template: >
{% if value|float==0 %}Standby{% endif %}
{% if value|float==1 %}Laag{% endif %}
{% if value|float==2 %}Medium{% endif %}
{% if value|float==3 %}Hoog{% endif %}
{% if value|float==4 %}Full{% endif %}
{% if value|float>=11 %}Hoog(T){% endif %}
fan:
- platform: mqtt
command_topic: "ITHO/Fan/cmd"
state_topic : "ITHO/Fan/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: "ITHO/fan/State"
preset_mode_value_template: >
{% if value == '1' %}
low
{% elif value == '2' %}
medium
{% elif value == '3' %}
high
{% elif value == '4' %}
full
{% else %}
off
{% endif %}
payload_low_speed: "State 1"
payload_medium_speed: "State 2"
payload_high_speed: "State 3"
optimistic: "true"
name: Afzuiging badkamer
speeds:
- low
- medium
- high
group:
Ventilator:
entities:
- fan.afzuiging_badkamer
- sensor.Snelheid
- sensor.Tijd
From this point i have my working HA again. But only i can change the fan speeds etc with the wireless remote from the ecofan it self. I tried to pair the ESP again with the join command but it doesnt connect anymore. Also not when i use the leave command 9999.
So from this point im almost there. Maybe someone has any idea so we can sort this out
Thanks for sharing. i have made some changes on my code and now its working ( after powerless making of the ESP module ). so now i can also change speeds from HA. And thanks for the addon in remote ( now i can see which remote i am using or control by HA ).
One thing i want to add is the ‘remote’ option automatic. This option makes the Itho go higher based on Rh. This option enables the medium. I think this is missing from the code of @jodur ?
I hope someone can help me. I’m busy trying to use the version off @jodur in ESPHOME. But i can’t get a join with my Itho box. Also don’t see any error in the logs.
Only thing i did see, when i do a OTA, i get a error (Error1) with uploading the bin file. And when i disconnect pin D1, i can upload.
I have a other nodemcu with cc1101, with espeasy that is working fine with my ithobox. But i would have all my boards in ESPHOME.
i have ESPHOME installed. but since i had some OTA issues and errors i just did the ITHO outside ESPHOME. but good question. its good to have it in ESPHOME instead of outside. sry i cant help you on this
@Alfagek , It is a know problem that the interrupts causes issues with a OTA. The workarround is indeed disconnecting the interrupt pin or disable the interupt trough a software change in the esp version. I know there is a change request from someone who implemented a software switch to disable the interrupts. I am waiting for ESP home to implement a OTA event trigger, so whe can disable the interrupt during OTA. For now the workarrounf for updating is a USB/COM upload or disconnecting the interrupt pin when using OTA.
Other question I have, how can I debug why I can’t pair with my itho box. In the logs i see “join on” “join off” when I use the join switch. But it doesn’t pair with the itho.
With a other nodemcu I have it working with espeasy and a old version from Sten vollebrecht
I switched from ESPeasy to ESPhome today. I can control my fan from within Home Assisant. Next thing is to add the remote ID so I can also see the changes when I use my remote. Can someone point me in the right direction of getting the ID? I lost it when I reflashed my old ESPeasy firmware. Thx!
I was Surprised to see that the manual was updated with new code, thanks for that!!
however if i copy paste it in my itho.yaml my config check gives this error:
expected a dictionary for dictionary value @ data['packages']['itho']
And thats the most weird Fault code i have seen in some time, probably a Coding or spacing error, but i dont know where to look. You guys have an idea? the old one worked fine.
- platform: mqtt
name: Ecofan
command_topic: "ITHO/Fan/cmd"
state_topic : "ITHO/Fan/State"
state_value_template: "{% if value|float==0 %}State 0{% endif %}{% if value|float >0 %}State 1{% endif %}"
payload_on: "State 1"
payload_off: "State 0"
optimistic: true
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: "ITHO/Fan/State"
preset_mode_value_template: >
{% if value_json.fan == low %}
State 1
{% elif value_json.fan == medium %}
State 2
{% elif value_json.fan == high %}
State 3
{% elif value_json.fan == full %}
State 4
{% else %}
State 0
{% endif %}