Then I added a tile card and used the ‘Custom Features’ HACS integration to create a selector feature and added the 7 options to that (this part was surprisingly easy).
It seems like a lot of work to do something which seems quite simple and should be built in. Have I done something strange or is this the correct way to do it?
Also, what would be the best way to update the input_select option if the fan speed was set through another method like in the more info panel? Another automation to update the input_select when fan speed changes?
And if I were to expand this to other fans, would I just duplicate everything?
I use multiple custom cards and template sensors for button control. The SVGs are assigned to the direction and speed(not necessary and needs streamlined)
That’s a really clever solution. I tried implementing it with no luck unfortunately.
Either way I was more wondering whether the way to implement something seemingly simple is through the use of input selects, automations and custom integrations… which appears to be the case.
I’ve added my automation for reference. Happy for feedback on it but it’s pretty simple, which I like.
triggers:
- trigger: state
entity_id:
- input_select.study_fan
id: Study Fan Speed 0
to: Speed 0
- trigger: state
entity_id:
- input_select.study_fan
id: Study Fan Speed 1
to: Speed 1
- trigger: state
entity_id:
- input_select.study_fan
id: Study Fan Speed 2
to: Speed 2
- trigger: state
entity_id:
- input_select.study_fan
id: Study Fan Speed 3
to: Speed 3
- trigger: state
entity_id:
- input_select.study_fan
id: Study Fan Speed 4
to: Speed 4
- trigger: state
entity_id:
- input_select.study_fan
id: Study Fan Speed 5
to: Speed 5
- trigger: state
entity_id:
- input_select.study_fan
id: Study Fan Speed 6
to: Speed 6
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Study Fan Speed 0
sequence:
- action: fan.set_percentage
metadata: {}
data:
percentage: 0
target:
entity_id: fan.study_fan
- conditions:
- condition: trigger
id:
- Study Fan Speed 1
sequence:
- action: fan.set_percentage
metadata: {}
data:
percentage: 16
target:
entity_id: fan.study_fan
- conditions:
- condition: trigger
id:
- Study Fan Speed 2
sequence:
- action: fan.set_percentage
metadata: {}
data:
percentage: 33
target:
entity_id: fan.study_fan
- conditions:
- condition: trigger
id:
- Study Fan Speed 3
sequence:
- action: fan.set_percentage
metadata: {}
data:
percentage: 50
target:
entity_id: fan.study_fan
- conditions:
- condition: trigger
id:
- Study Fan Speed 4
sequence:
- action: fan.set_percentage
metadata: {}
data:
percentage: 66
target:
entity_id: fan.study_fan
- conditions:
- condition: trigger
id:
- Study Fan Speed 5
sequence:
- action: fan.set_percentage
metadata: {}
data:
percentage: 83
target:
entity_id: fan.study_fan
- conditions:
- condition: trigger
id:
- Study Fan Speed 6
sequence:
- action: fan.set_percentage
metadata: {}
data:
percentage: 100
target:
entity_id: fan.study_fan
mode: single
I actually just realised this after posting my comment and managed to get it working. Thanks for also pointing this out!
I actually tried this at first but felt like it became a bit cumbersome… but maybe I did someting wrong. I feel like I have a bit of a solution now anyway.
I still feel like this is a lot of work for something simple. Maybe just a shortcoming of hass, or just how home automation is.
Thanks all for the help. I marked Tom’s first post as solution as that’s what I ended up going with.
It’s the result of integrating a multitude of different brands/fan types with specific features. Then you need to manage updates and bug fixes for those APIs.
That’s very true. I guess making sure integrations work is the more important part. I love seeing all the great work being put into home assistant with each release, definitely the best and most collaborated open source software which exists.
I completely forgot, but I still need a solution to automatically select the input_select when the fan speed changes outside of that. Basically the reverse of the automation above. I’ll have a play around with creating an automation but if anyone has a good solution I would be grateful
I run Modern Forms fans and the integration adjusts whether I am using HA of the MF apps.
Data is relayed between the MF app and HA. The integration DOES matters, but in most cases HA has a work around if there is no direct integration available . It just may be more convoluted as we discussed earlier.
I actually use a Bond Bridge RF Controller, so the fans are dumb but the fan speed is tracked through the Bond service. It actually works incredibly well after recording the frequencies of the remote with the bridge.
I know I’m never going to have the physical remote synced up with the bridge, it’s impossible to do, but my plan is to get away from using the physical remote and installing mounted tablets in rooms anyway, so all fan speed commands are from HASS.
Anyway I’m pretty sure I just need the input select to change based on the fan speed, in those cases when the input select isn’t used to change the fan speed. Like if I change the speed in the entity itself.
I don’t believe so, just the percentage state of the fan speed. I’m not amazing with hass so I might be understanding wrong. Just to clarify, the bond bridge works by pressing a fan speed button on the physical remote and then recording that number in the bond app. So I’m just assigning that number from the remote to the service.
Anyway I made a small automation to change the input select option to 0 when the fan is turned off with a toggle button. I would like it to change to the last non-zero option when toggled again to back on, but not sure how to do that. I would also like to extend the functionality to all other options, but may just have to duplicate the below logic for that. However I can only see the states of on and off… Not sure how to change type to the speed percentage
It works for one of my fans with 3 speeds, but not ones with 6 speeds. It uses a slider instead, which isn’t too bad but I prefer buttons.
I also want to change the icons of the buttons for my 3 speed fan, so it’s likely I will use the same setup as my 6 speed fan, once I figure out my second issue.
Edit:
I decided to just stick to the automation of making the input select 0 when fan is triggered off, without the option to trigger it on. The numbers can be pressed to turn it on. It works well enough