Im going to add an iFan04 and am looking at how to control the fan speed with a single hardware button on an NSPanel. Basically, it will be a counter with 4 steps, 0-3, with zero being ‘Off’ and 3 being ‘Max’. Each button tap will increase the counter.
What i can’t get my head around is how to see what the current counter # is so that it knows that if it’s already 3 then reset the counter to 0 before sending the fan controller the speed command.
Im using the gui because I’ve yet to get my head around YAML coding.
Here’s the properly formatted code and it works perfect. I just have to add the action at the end to send the fan controller the command to actually set the speed. I put a ‘notify’ command as a temporary placeholder for where the command will go.