Z-Wave Fan Switch Toggles On, Off, and Back On

I have recently added a z-wave fan switch (GE Enbrighten 55258) to my z-wave network. It has a weird bug that none of my other z-wave lights/switches (14 others in total) have: when I turn it on from Home Assistant it will toggle on, then off, then back on in a very short time (see attached recording). This happens every time, from both the web interface and from my Android phone.

I have tried removing and re-adding as well as healing the z-wave network. Neither has fixed it.

Any idea how I can fix this?

Screen Recording

This isn’t a bug, this is normal behavior with devices that take a bit to turn on. Basically, the device doesn’t instantly report that it’s on when you turn it on. The UI will show that throughout the ‘turn on process’. Basically this is what’s happening:

  1. You turn on the device.
  2. Home assistant reacts and assumes the device is on.
  3. Home assistant asks the device what it’s state is.
  4. The device replies “I’m off”.
  5. Home assistant reacts and shows the device as off.
  6. A second or so passes, the fan reaches it’s speed.
  7. The device tells home assistant “hey, I’m on now.”
  8. Home assistant reacts and shows the device as on.

That FR was solved long ago with ZwaveJS. ZwaveJS now queries dimmers as they ramp up or down and the state reflects the press.

This does not happen for the GE enbrigthen fan because it’s completely different hardware and it doesn’t have ramp up/down rates.

1 Like

Thank you for the explanation!

I am using the official zwavejs integration.

Is there a way to add a delay for specific entities only so Home Assistant will not query too quickly?

Just make it a button in the UI instead of using the toggle. It’s a byproduct of the toggle graphic in the UI. If you actually watch the state, it does not turn on when you turn it on.

So if you use a button or something else to turn it on instead of an entities card, it looks normal. That’s what I do.

Thank you!

It’s not really querying it too early. The frontend toggles are optimistic, which ends up having this problem.

I tried to dumb down the actual process to make it relatable. Really what’s happening is:

  1. You toggle the UI
  2. The UI reacts and shows on
  3. The UI looks at the actual state of the entity without querying the device
  4. The state in HA is off
  5. The UI reacts to it and shows off
  6. When the fan reaches speed, it reports that it’s on
  7. The UI reacts to it and shows on.

Actually, Z-Wave JS made that problem worse. It has a refresh delay of 5 seconds when you turn a switch on. Even if the ramp rate is really fast, the switches that have these problems won’t update state. With OZW, the refresh was sent without a delay, so fast ramp rates would solve it.

Odd, all my dimmers that had this problem actually show the proper % as it ramps up. Before in OZW, it wouldn’t show the ramp up rate, just jump to 100%.

So what am I remembering then? IIRC, there was a fix in ZwaveJS that properly showed ramp ups that fixed all jasco dimmers. Sometime around… feb → may 2021.

You may be remembering the PR that set the on/off optimistically, then was considered to be a frontend bug and the zwavejs PR for this was killed.

I think you’re referring to the case where you set a brightness value. The driver reports a fake update when it sees this. Although, there’s no “ramping” there, it jumps to the programmed value.

This case is when you “turn on” the switch, it has an indeterminate level value. It requires a refresh for switches like GE, that don’t report state on their own. The level remains “off” until that refresh occurs 5 seconds later.

I don’t think that was it. What ever I’m thinking of is working in HA atm. was working the last time I looked… 8 months ago probably.

It’s possible. I actually just looked at the UI and the behavior has changed. Before it would ramp up and you could see the percentage in the UI. Now it just straight hops to the value. I guess I’ve been out of the loop on this one for a while.

1 Like

Other than using two buttons (on and off) for my fan switch, is there another way to fix this behavior while using the on/off toggle?

Set it to an explicit percentage, instead of just “on”. Or, the easiest method, just ignore it.

Is there a way to add a delay for specific entities only so Home Assistant will not query too quickly?.

There is not.