Lovelace Fan Control Entity Row

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.

In preparation for possibly…maybe…including my component into HACS I have moved the location of the component to a new repo.

It can now be found here:

there hasn’t been any changes to the component. It’s just in a new location.

This “plugin” has been added to the HACS component.

You can now install it directly from the community store.

I just want to thank you for producing and sharing this card. It should definitely be part of the core.
Thank you again

1 Like

Just to give you an update…

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 :frowning_face:) 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.

EDIT: Here is the link to the esphome code:

Thank you so much! Working great!:smiley:

1 Like

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?

Thanks for any your suggestions !!!

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.

any chance this can be updated for ifan03?

I’m sure it can.

As far as I know the iFan03 works functionally the same as the iFan02. It’s just a three speed fan controller.

The only things that would need to be figured out is the MQTT topics that the iFan03 uses after it is flashed with Tasmota.

You do have it flashed with Tasmota, correct?

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.

What is the config for your fan?

I’m not sure why this has any effect on your light on the fan. There is literally nothing in the component that has anything to do with the light.

Any way to control the button size (or the OFF, LOW, MED, HIGH) - the buttons are way too small on a mobile phone? thanks

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:

return Polymer.html`
            <style is="custom-style" include="iron-flex iron-flex-alignment"></style>
            <style>
                :host {
                    line-height: inherit;
				}
                .speed {
                    min-width: 30px;
		    max-width: 30px;
		    height: 30px;
		    margin-left: 2px;
                    margin-right: 2px;
    	            background-color: #759aaa;

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…

@mpfurnari

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.

all my fan is from brodlink how do i add it to the card? any sample?

image

Have you looked at the instructions for using the row control on the github repo?

It references my fan control package which contains examples of how to set it up using codes from a Broadlink to control an otherwise “dumb” fan.

See here starting at line #41:

You’ll have to substitute your details in as stated in the instructions.

1 Like

I read this, unfortunately I don’t understand HA enough to know what to do :frowning:

read up on how packages work here:

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. :wink:

1 Like

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.