Does anyone know how to call a script based on a certain slider perentage? i have an RF fan integrated with boradlink and each speed is a script. So I would like to use a slider that calls each speed based on percentage range. This is what I have so far. icon changes just fine(someone else gave me that code), but I’m trying to incorporate the script and dont know how.
I don’t see anywhere in the Mushroom card docs that says you can incorporate an automation into a mushroom template card. The card allows the execution of actions based on tap, double-tap, or hold. You have two options:
Create an automation that is triggered off the state of your input_number helper.
Switch to a template number which incorporates automation actions into the entity itself.
There are many ways to do what you want in an automation. Based on what you have posted, one way to do it would be something like the following… (make sure you insert the values for the commands in the variables section)
Happy to help… FWIW, you can probably lower the for: on the trigger to 1 second instead of 2. Having a for: defined helps keep the automation actions from executing too often when you are using the slider to change the value, but there’s always a balance to figure out between how “bouncy” and how “laggy” you are willing to have an automation act.
Hey would you be able to show me your mushroom card code for this? Trying to do the exact same thing but struggling to figure out how I can have my 5 speed DC fan controlled via Broadlink use the slider
I’ve replaced ‘script.cigar_fan_off’ to ‘script.master_fan_power’ (because that’s my RF script for fan power)
and removed the top stuff re exhaust fan, however while I’m not getting errors in code, I’m just getting a blank mushroom card when I save it. Did you do anything else outside of creating the mushroom fan card to get this to work?
Ok, Ive now got the slider working and my input_number.fan slider automation set up, however every time I move the slider on my dashboard i get an error of: failed to call service fan/set percentage
is the percentage slider now deprecated with an update HA? or its more likely Ive got something wrong