Just comment out the automation that toggles the off button. That will prevent it from sending the same command twice. But I’m not sure how the fan control row will work if it tries to send an off command to turn on the off switch but the switch is already on.
You may have to play around with the code in the package to get it to work as expected. I don’t have a fan that works like that so I can’t really do anything to test it on my end.
I fixed the component so that now it works with the iFan02 flashed with ESPHome.
When I tried to flash my iFan02 it wouldn’t compile (don’t remember what the error was ) but I made a couple of modifications to my ESPHome code and everything is now working great with the newly updated component.
You can now either use HACS to update the code or download it from the repo again.
I’ll update the github repo with the instructions to include the ESPHome code I used.
Hi, @finity
I think the dumb fan with RF Recv. , which you mention, have 4 code: Off, Low, Med, Hight, that’s right?
But my fan using IR have 3 code: one for ON/OFF, for SPEED(3 level cycle) and for ROTATION, only. I 's learned 3 code and want to control it by broadlink.
Do you have any yaml code for that?
No, sorry I don’t. None of my fans work like that so I’ve only developed my component and yaml to control the “regular” 3 speed fan as most are in the US.
You could fairly easily set up the automations to do that but it will likely have to be three separate automations, tho.
Tried using this card - but when using it to set the speed, it seems to revert back to the 1st setting I used when I turned on the fan… I.e. I turn it on “low”, then try “medium” and it reverts back to “low”. Anyone else have this experience?
edit: actually, I just realized that if I start off w/ “medium” it starts on “high” and I can never get “low” or “medium” to work.
Edit2: … and it randomly turns on the light attached to the fan… Which I feel like must be a coincidence - but I’ve never seen this before.
Not without going in and modifying the js code itself. I don’t have that as an option. I think the buttons look fine on my Galaxy S8 screen so I never even considered it.
But if you want to manually change it you can edit the lines for “min-width”, “max-width” & “height” in this section:
But be warned that you’ll change it for both mobile & desktop so you might not like it on the desktop then.
There might be a way to change it with some other custom tool like card-mod or something but I have no experience with custom styles using those plugins so I don’t know if it’s possible…
The updated version of that code from the other thread is already in HACS. It can be found under the name “Fan Control Entity Row”.
It allows you to do some additional styling on the way the buttons are displayed but it’s basically the same code.
If you want to put your four button code on HACS feel free but just be aware that you’ll need to change it’s name to easily distinguish between mine and yours.
basically packages are miniature versions of your configuration.yaml allowing you to bundle all domains/entities that are required for a “system” into a single yaml file.
So you would add the reference to “packages” in your “homeassistant:” section of your configuration.yaml file. Then create a fan_package.yaml (or whatever it is you want to call it) and paste all of the contents of my fan_package referenced above from line 41 on to the end into that file EXCEPT the “swtch:” section since youi already have your broadlink switches configured elsewhere (unless you want to move them to the package as well and that will work too)
Lastly, you will need to replace all of my fan switch entities (switch.sunroom_fan_0, switch.sunroom_fan_1, switch.sunroom_fan_2 & switch.sunroom_fan_3) with your corresponding entities (switch.fan, switch.fanspeedone, switch.fanspeedther & switch.fanspeedtho) as needed throughout the file.
EDIT: And of course change all of the names of the entities tro whatever makes sense for you use. Unless you are controlling a “sunroom fan” too then you should be good to go as is.
I have this dumb zigbee remote fan module. When I use this it always reverts to medium if I set to high or low clicking the buttons. The Off button works properly and if I use the drop down to change from High to Medium To Low it changes and the entity changes. But if I click low it’ll change the fan setting for like 3 seconds then revert back to medium. always medium. Any suggestions? This zigbee module does have 4 settings not 3 but they are low,medium,high, and smart so I didn’t think that would have an affect on the button working.