I have it all in configuration.yaml
In the editor I fiddle with identations and dashes until it gives the green light, then save it, and check it for validity in the settings. Right now I changed it to this, which is fine in the editor, but not ok when I check it:
invalid config for [fan.template]: [input_select] is an invalid option for [fan.template]. Check: fan.template->fans->sunroom_fan->input_select. (See ?, line ?).
A big problem for me is right now that I honestly donât know what I am doing and donât know when and why I need to indent or apply dashes. But Iâm good at copying and pasting Must be terrible for you all to see folks struggling with what should be obvious. Tried to find some tutorial texts to educate myself, but that is a challenge tooâŚ
And indeed that works a lot better I actually found the online docs for fan_template where indeed input_select is not an option - so the error message was well deserved. Moved things around a bit. Continued my work and found the script creator in HA itself, and rather that stuffing all the script parts in my configuration.yaml, I entered them there. That went pretty good. Had to scratch my head a bit how to fit in the service_template part of the sunroon_fan_on script, but luckily that interface also had a button to edit the underlying yaml, so I could paste it in. Long story short, my buttons work, change color, turn on the fan at the right speed, all pretty neat!
BTW, I use the build in editor of HA, from the left hand menu. Oh, and sure I sometimes forget to reload scripts, but thats fine as it keeps me reminding that I should not forget to do that.
There is one little thing I need to figure out, and that is - if I click on the buttons 1-2-3 and off too fast, it sometimes indicates as if the fan is turned on, but in fact it is off. In the javascript, at the bottom, I see that the setspeed function first sets the fan off, and then sets the new speed. Not sure why is that. I am tempted to modify thing a bit, and move the turning off part to the sunroom_fan_on script, and extend the if/else to 4 choices, including the âoffâ speed. Well, perhaps I better if I first enjoy what I have now
It is really very entertaining stuff, all this. Itâs still a lot of abracadabra but Iâm hopefulâŚ
Thatâs there only if the Off button pressed on the control row.
I originally only had the âturn_offâ service called but then someone had a fan that didnât have a âturn_offâ function but turned the fan off by setting the speed to off. So I added that to handle both scenarios.
It shouldnât have the effect that you are seeing so I donât think itâs related.
@finity Interestingly, I found a similar issue yesterday:
My fan is connected to HA via a Hunter RF kit & a Bond bridge. This particular combination supports fan.turn_off, but passing speed: off to fan.set_speed in fact sets the fan to low (HA & Bond do not realize this).
Would you be open to a patch that performs the set_speed call first, followed by the turn_off call?
If I understand the various edge cases properly, that should work for both:
Fans that do not support the turn_off service
Fans that support turn_off and respond incorrectly if set_speed is passed off.
Fan control for dummies (via relais)
I did install this component via HASC and created the logic for two states to change the value of
input_select.ventilation_fan_speed. But nothing happens , either if I trigger the states from outside via scripts or I push a button of the card.
The input looks as this:
options:
- 'off'
- low
- medium
- high
editable: true
friendly_name: MVC Ventilation Mode
icon: 'hass:fan'
THX finity, I wasnât aware about the fan class entity in HA. It works now, but I can only set the fan to low speed, If I push on Medium or High buttons, the speed goes for one second to the correct one, but than to the Low speed again. Very strange to me. I also see that my automations doesnât work.
see: https://pastebin.com/B4sVZK0K
Here as well the scripts: https://pastebin.com/tUzWwNSz
And the fan itself: https://pastebin.com/embed_iframe/0q7zgCC1
there is a lot wrong with that config. Iâm really not sure where to beginâŚ
you donât ever seem to be turning on any switches to control the actual fan speeds. the only place I see any reference to a speed is in the fan turn on script and then itâs only for low speed.
you are turning on and off scripts but I donât see anywhere in those scripts that you are turning any switches.
Have you seen my github gist that shows fan configs?
ok, did found the issue about not to able to switch to High. The Automations where not yet complete because I wanted having first the manual mode running.
With the latest release 2021.3.1 and the changes to the template: fan , does this component still work? I only ask because I donât want to ugrade if itâs going to break on meâŚWife doesnât like when that happens. LOL.
Still works for me with existing template. I havenât figured out the new templating yet but everything works just some warnings about being deprecated.
What really sucks is that with the change in the control scheme for fans I may need to create a whole new plug-in to deal with the percentages. that way people who donât want to upgrade can still use the existing plugin because I canât think of a way to test which version of HA people are running.
So it will likely be easier to just create two versions.
Once I figure out what the right syntax is for everything Iâll start working on it. But no one who knows has answered any questions in the release thread yet (or anywhere else).
Iâm still fighting to get my template converted. Itâs weird, I can still use the fan control entity row to set any speed and see it on the new percentage slider but if I use the slider I only get low and high to work. Set the fan control entity row to medium, slider says 67, set slider to 67 and nothing happens. This is all using my old template that I havenât converted to the new 2021.3 config yet. Iâve got something going with the new config and the 67 percent doesnât work there either but does give an error at least. Going to open an issue.