I have updated the github with a NOTE at the top of the fan package code.
I just updated to V92.1 and the fan control still works for me.
Are you still having problems?
Not sure yet. I wonāt be able to upgrade to 92.1 for a few days as Iām out of town. Iāll let you know as soon as I get back. I do appreciate you checking in though. Thank you.
FYI - I logged in remotely and added your fan controls to my config. Not sure what changed but it is now working on 0.92.0. I am at a loss.
Thatās great to hear!
is there a legit github repo for this?
iām not sure what you mean by ālegitā but here is the github page with the info required:
https://github.com/finity69x2/Home-Assistant/tree/master/www/lovelace
Yah, thatās what I meant. Thatās ālegitā. Thanks!
Is it possible to use this fan buttons with ESPHome flashed sonoff ifan02
i havenāt gotten an iFan02 flashed with ESPHome yet so I canāt verify it but I donāt see why not. as long as it still provides the feedback for state on/off & speed then it should work.
I canāt seem to get the card to work after flashing my ifan02 from tasmota to esphome i can change speed via the card when the fan is already on. But when the fan is off I canāt turn it on via any of the speed buttons
Iāve never tested the control with ESPHome yet so Iām not sure how the controls integrate into HA.
Could you please post your ESPHome firmware code so I can flash a spare Ifan02 I have here so I can test it?
Of course! Working really well for me so can highly recommend it Here are the files i used https://gist.github.com/quazzie/09ee3ef2c419ecbcf979a7410062481b
Found them in this thread on github
https://github.com/esphome/esphome-docs/pull/218
Thanks!
Iāve never worked with āincludes:ā in ESPHome.
Where do I put the āifan02.hā file so that ESPHome can find it at compile time? Is it just in the same directory as the rest of the ESPHome yaml files?
Yes, just the same location as the other yaml files
I previously had your fan control setup and working great in HA to operate my RMPro controlled fans. However it has stopped working and I canāt figure out why. When I click the Low/Med/High/Off buttons the RMPro commands are no longer being sent, and I see this in the logā¦
Error executing service <ServiceCall script.mbr_fan_on (c:340632438bc54f90b02d842067286a01)>
10:23 AM core.py (ERROR)
Script script.mbr_fan_set_speed already running.
10:23 AM components/script/init.py (WARNING)
Error executing service <ServiceCall script.mbr_fan_on (c:ce0c5dc0f04b4a40ad94deff24c741c8)>
10:23 AM core.py (ERROR)
Iāve tried replacing the .js file and have gone through my config and it hasnāt been changed. Iāve updated HA to 0.93.2 (from 0.91.x and 0.92.x) with no difference. Any ideas what could be going on please?
From the log it doesnāt sound like the entity component is the problem.
It looks like itās problem with the script. The script isnāt technically part of that component. Itās just provided as a reference to get a ānon-smartā fan working with the component.
Can you run the script to turn the fan on or to set the speed (the ones referenced in the log errors) manually? If the scripts were working before then did you make a change that would cause them to no longer work?
Thanks you are correct. I ought to have done this to begin with, but I just re-added a fan with a fresh copy & paste of your code and it all works fine, so I must have broken some of my old code when doing something else.
I do have another couple of issues I was hoping you might be able to advise on?
Firstly if I leave the automations section intact each command is sent from the RMPro to the fan twice, which isnāt a problem when sending low/med/high speeds, but on turning off it results in the fan switching back on again since my fans use the same command for both on/off. Iām guessing that the automations purpose is to revert the state of the switches in HA back to off after they are used, but is there a way I can prevent the commands from being re-sent? If I simply delete all of the automations then my fans do work better as the commands are only sent once and therefore the off function works, and the entity card itself in the UI reflects the correct state - however the HA backend still retains the incorrect state, so I imagine this is not a viable overall solution.
Additionally, Iām trying to add physical smart buttons to be able to control the fans. I have Xiaomi buttons setup in HA and NodeRED. They have single-click, double-click, and long-hold functions. Iāve set it so that pressing double-click can cycle through triggering each of the different scripts in sequence which is effective, however this obviously doesnāt update the aforementioned entity in HA, which Iād like to keep all in synch. Do you happen to know if there is a more elegant way to accomplish this? Thank you
Iām glad you got it mostly working.
just to clarify your problem thoā¦
you are saying that your fan doesnāt use the speed selection switches to turn the fan on? That there is another fan switch that turns the fan both off and on?
so, the four switches you have are:
low
med
high
on/off
And that the on/off switch uses the exact same rf code to turn the fan both on and off as a toggle like it does for the light?
is that all correct?
Almostā¦ the original RF remote has an on/off button and individual 1 - 5 speed buttons (though Iāve just been using 1, 3 and 5).
The on/off button sends the same command and will toggle the fan state, automatically resuming the previous speed setting when switching on, like a light would do.
The individual speed buttons can be used to switch the fan on without needing to press the on/off button first, but cannot switch it off.
I want HA to make the RMPro send a single speed command to switch on, and a single on/off command to switch off. Your code unmodified but with the automations section excluded does this perfectly, but as soon as I put the automations back in each time I press a speed setting the signal is sent twice (signified by 2 ābeepsā from the receiver on the fan) which isnāt a problem as repeating the same speed command it is already operating at doesnāt change anything, however when switching off it sends the off command twice, which ultimately cycles it off and quickly back on again (again 2 ābeepsā from the receiver).