Closed broyuken closed 3 years ago
For sonoff ifan03, i face the same problem. Even tough the speed is 0 when i press the OFF button, the on/off switch is still ON.
Yes, I'll look into it.
I've just now mostly figured out how these new fan control changes are supposed to work.
Appreciate it, this change to fans in HA is annoying but in the end I think it will be helpful overall.
I just made a change to the code.
Could you try it with the latest and see if it works OK now?
remember to clear the cache to force the new code to be reloaded after you restart HA.
in the end I think it will be helpful overall.
Unfortunately I'm not as optimistic as you are.
I think they could have left the speed list stuff intact and just added the percentage stuff for people who needed it. It would have been way easier than trying to figure out how to transition to the new stuff for people who's fans were already working perfectly fine.
But that's water under the bridge now.
Turning it off works as expected now, however if the fan is off and I click one of the speeds, nothing happens. The fan doesn't turn on.
I also had the same issue with OFF not working, thought it was my code so didn't raise an issue.
Confirmed it kind of works in v1.3 (better than before), however after it turns off, 3 seconds later is is turned back on automatically.
My code as follows:
#CONFIGURATION
fan:
- platform: template
fans:
b3_fan:
friendly_name: "Bedroom 3 Fan"
value_template: "{{ states('input_boolean.b3_fan_state') }}"
percentage_template: "{{ states('input_select.b3_fan_speed') }}"
turn_on:
service: script.fan_on
turn_off:
service: script.fan_off
set_percentage:
service: script.fan_set_speed
data:
percentage: "{{ percentage }}"
name: "b3"
#SCRIPT
fan_off:
alias: Fan Off
sequence:
- service: remote.send_command
data:
entity_id: remote.rmpro_remote
command: b64:sgDKAAsXCxcLChgXChcLChgKGAoYChgKGAoYChcKGAsXChgKGBcLFwoYCgsXFwsXCwoXFwsKGBcKCxcLFwoYChgKGAABCAwXCxcKGAoLFxcKFwsLFwoYChgKGAoYChgKGAoYChgKGAoXFwsXCxcLChgWDBYLChgXCwoXFwsKFwsXChgKFwsYAAEIDBYLFwsXCgsXFwsXCwoYChgKGAoXCxcKGQoXChgKGAoYChgXChgKFwsLFxcLFwoLFxcLChcXCwoYChcLFwoYCxcABdwAAAAAAAAAAAAAAAAAAA==
- service: input_boolean.turn_off
data:
entity_id: input_boolean.b3_fan_state
Two things additional to this issue:
@broyuken
Are you sure the fan works otherwise not using the plugin?
I have a template fan that I'm testing it with and it's working fine.
Could you post your fan config along with any associated scripts and/or automations in the forum and tag me in the post?
I find it's easier to communicate there than here.
And I'm not really sure it's an issue with this plugin.
@Stupco
I'd rather not. It would be better to figure out the reason that your fan is behaving like that instead of providing a workaround in the plugin. If you are a member of the HA forum would you mind posting your fan code there (along with all associated scripts/automations/input_x entities and tag me in the post so I can look at it there?
I have no idea. Ludeeus said he was going to start going thru them a few days ago but he never has yet. So I'm just waiting on him now.
Yep, nevermind. You pointed me in the right direction and I was able to fix it. My script didn't have a condition to turn the fan on first if it was off, it just changed the speed which did nothing since the fan was off. Fixed my script and all is well now. Closing.
@Stupco
- I'd rather not. It would be better to figure out the reason that your fan is behaving like that instead of providing a workaround in the plugin. If you are a member of the HA forum would you mind posting your fan code there (along with all associated scripts/automations/input_x entities and tag me in the post so I can look at it there?
- I have no idea. Ludeeus said he was going to start going thru them a few days ago but he never has yet. So I'm just waiting on him now.
@finity69x2
Posted the code where I have the issue of the Fan Percent Button Row not turning off: HA Forum post
That’s why you need to add a smart switch with power monitoring :) then you know what speed the fan is on even if it’s controlled by someone outside of HA
Can't argue with that, but that's just extra $$$ :(
Don't see why you couldn't re-activate a fan level that is already active?
Not arguing with that either I think it would be a great addition, but I picked up a sonoff switch for power monitoring and am extremely happy with how my fan works now.
Definitely the better way, probably should have just replaced the whole ceiling fan.
Can you set power ouptut for your sonoff fan and that sets the DC ceiling fan speed?
Oh mine isn’t a ceiling fan, mine is a floor oscillating fan with a remote. That wouldn’t work for a ceiling fan unless you had a sonoff that could go online or something. Probably better off with an Inovelli fan control switch to control it instead.
I'm programming a Lanbon L8 using HASP-LVGL, so I just need an in ceiling solution (not a switch plate).
ugh, oh well :) Thanks mate for all your advice and help.
ooh I like that, so if you control the fan via the switch then HA would know about it. But if you use the remote it wouldn’t. So just hide the remote and only use HA or the switch to control it.
Is there no switch for controlling on/off for the fan? Is it hard wired on and only controllable via rf?
Yeah basically. I will hide the remotes, but I have rare occasions where for some reason sending the RF code via HA doesn't work, and it thinks it's in a different state.
Hence my request to allow for the action of an already active button.
Should I make a seperate Feature Request to track this? Or should I leave it alone haha
Using the off button it doesn't turn the fan off, it just changes the speed. My fan uses a different IR code for on/off and change speed. Can you make the off button actually send the off command?