your speed template is set up incorrectly.
I ended up finding the previous forum to this and that card had a mod for my zigbee fan. Just doing some work on the custom themes from this project to get the colors right now.
I have implemented this with Lutron PD-FSQN and it will always set the speed to medium, despite the entity showing that the states are off,low,medium,high. Do I need to do something else for this device to get the entity row plugin to work properly?
I donāt have one of those devices so itāll be hard for me to say exactly what the issue is.
what platform doers that device use? zwave, mqtt, etc?
Did you have to code the config for the fan controller or did it create a āfan.ā entity in HA automatically?
Being a Lutron device, Iām not even sure how to answer the question of what type of device it is. They are auto-configured with the Lutron bridge integration into HA. But yes, just auto-configured by HA.
Thatās the answer
Iām assuming that the integration creates a fan entity in HA that has three speeds (and āoffā) that are controllable from the pop-up box?
what is the state of the fan entity when the fan is running in some speed? is the state āonā or is it the selected speed?
Yes the integration creates the fan entity with the 3 speeds and off. They are controllable through the box and they work properly that way. Additionally when I set it to low or high through the other card, the speed in the Fan Control Entity Row card updates properly. Itās just setting the speed through this card that is apparently causing me issues!
State is: āonā and the attribute of āspeedā takes on low, medium or high.
without being able to see the messages being sent around Iām not sure I can even begin to troubleshoot this issue.
I see no reason that particular fan controller should work any differently than any other 3 speed fan entity in HA. And as far as I know I havenāt heard of anyone else experiencing similar issues with it.
Can you see the commands being sent between HA and your hub when you change the speeds using the entity row and compare that to the commands when you use the pop up box?
as an alternative, you could create an MQTT template fan and use that to switch the actual fan entity speeds but then you will end up with two entities controlling the same fan which is obviously not ideal.
Otherwise Iām not sure I can help.
I tried to find āFan Control Entity Rowā in the Community Hass.io Add-ons and I donāt see it. I manually added it but when I reload the UI I get this:
Custom element doesn't exist: fan-control-entity-row.
entity: switch.garageafs_high_speed
type: 'custom:fan-control-entity-row'
name: Garage Air Filter
customTheme: false
I have the js file in the config/www directory and in my ui-lovelace.yaml file I have
title: My Home
resources:
- url: /root/config/www/fan-control-entity-row.js
type: js
and also:
- type: entities
title: Garage AFS
show_header_toggle: false
entities:
## USE THIS CONFIG TO HAVE IT MATCH YOUR THEME ##
- entity: switch.garageafs_high_speed
type: custom:fan-control-entity-row
name: Garage Air Filter
customTheme: false
Right now Iām just trying to test getting the card to display as I have a Sonoff 4 Channel Pro hooked up to an air filtration system that uses 3 separate relays for the speed control. I know Iāll have to do some work to get that actually working correctly but I thought Iād start with the UI first since the individual switches work in the UI now.
Thatās because itās not in the hassio add-ons. Itās installed thru the HACS custom component:
And normally when you have to install components manually and the file is located in the /www/ directory you have to add them to the lovelace config like:
title: My Home
resources:
- url: /local/fan-control-entity-row.js
type: js
in this case ā/config/www/ā = ā/local/ā
OK, itās been a few years since I messed with HA so Iām back to being a noob. I had tried using just like in your example and got the error so I thought wasnāt finding the js file.
I donāt have HACS installed but I think for now Iāve accomplished the same result or should I undo my changes and go through the HACS path?
I always recommend using HACS. It (almostā¦ ) makes things idiot proof.
As long as you follow the instructions in the install page of HACS for each component exactly as written regarding the way to add it your resources section in Lovelace you will be fine there.
But if you think you have it done correctly otherwise (in the above you donātā¦) then you can do it that way too.
But HACS is just way easier.
OK, I think installing HACS was more steps than what I did before but I just restarted and the card is loaded properly with the buttons now so thatās a step forward.
Now I just need to figure out how to get this to work with my setup. Each speed is just a different POWER command, Low is Power1, Medium is Power2, High is Power3:
- platform: mqtt
name: "GarageAFS Low Speed"
state_topic: "stat/Garage_AFS/POWER1"
command_topic: "cmnd/Garage_AFS/POWER1"
availability_topic: "tele/Garage_AFS/LWT"
qos: 1
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
retain: true
Iām not sure how that will work.
You will have to find someway to translate each āspeedā into a combined āfanā entity that sends the different command topics for each speed and retrieves the fan state and speed for each speed.
you might take a look at my config for converting a ādumbā fan that uses an rf transmitter that doesnāt have any speed/state feedback into a fan entity for use with the control row.
itās here and the section you are looking for starts on row 41. Be warned that itās pretty long and involved tho:
OK, thanks for the tip. In my old setup I had created an automation (jet_afs.yaml) and then in my groups.yaml I had this:
jet_speed_control:
name: Jet AFS Speed
control: hidden
entities:
- input_select.afs_speed
This is all from a few years ago so some of those brain cells are dead now
OK, Iāve been digesting your code and reviewing what I had done a few years ago and fortunately there are a lot of similarities. I do have a couple of questions though:
-
sunroom_fan_off: alias: Sunroom Fan Off sequence: - service: switch.turn_on entity_id: switch.sunroom_fan_0 # data: # packet: 'JgA0ACsMKw0PKA8pDygPKQ8oKw0PKA8oDykPAAEGKw0qDQ8pDygPKA8pDygrDQ8oDykPKA8ADQUAAAAA' - service: input_boolean.turn_off data: entity_id: input_boolean.sunroom_fan_state ```
If youāre turning off the fan why do you start with - service: switch.turn_on
?
- In your automations section you have a bunch of toggles where you turn on for 1 second and then turn off. Are those code blocks used anywhere? I think only the script section is actually used and maybe those are for something else?
Scripts are new to me and I currently only have automations defined. Is there a reason to use a script block over an automation block?
Those are really good questions.
Itās been so long since Iāve looked at the code I really canāt remember the details anymore.
Iāll have to dig in myself and try to jog my memory.
Or maybe itās all just bad coding that I did a long time back and things need to be changed to make more sense. it really could go either way at this point.
OK, I feel the same so no worries! Iām making changes now to see if I can get this to work. I havenāt messed with packages before but I can see how useful it is to keep everything in 1 spot.
Iāve got it all working now, itās a bit messy but at least it works. Iām on to my next challenge and thought Iād ask here first before I start from scratch. Iād like to enhance this now so that you have an option to run the fan for a set amount of time. Iām thinking either a fixed button choice for time (say 30, 60, 90min) or a slider that jumps by 30min steps (I want this to be easy to use with a touch screen).
So the fan operation works the same but if you select a time the fan will run for that set time and then turn off.