Issue with Rule

Another thing where scene causes troubles, but I'm not quite sure if it's the same issue as the one described above, because this was not working right in 2.2.8:

I have this rule:

WashingMachineFinished is hub variable/connector, which is set on by power meter on washing machine, and off by opening lid. As you see, when washing is done, there is an anouncement and kitchen light turns red - in case I'm doing something and forget about the anouncement - you definitely don't forget the red light :slight_smile:

This rule is working fine when the kitchen RGB light (Kuchyň světlo linka) is off. Washing finishes, light turns on, red, I open washing machine, light turns off. Problem is when scene on this light is activated - the exact scene from screenshot in previous post - light on, level 100, color temp 2500. When this scene is on, and washing machine finishes, the light turns red. That's fine. But when I open the lid, I'd expect the light to restore it's previous state - turn back to white. But it stays red, nothing happens. Can you please look into this too?

Can you clarify the sequence of events? If either of these is what's happening, that is normal:

  1. Bulb is off (before capture)
  2. But gets set to red at 100% (by this rule)
  3. Bulb gets restored (by this rule) and is returned to off state
  4. Something else turns the bulb on in the future with a plain "On" or "Set Level" command and the device turns on to red.


  1. Bulb is on (before capture)
  2. But gets set to red at 100% (by this rule)
  3. Bulb gets restored (by this rule) and is returned to previous color/color temperature

The first set of events can be surprising to some people, but the issue is that the on/off state is all that is being captured and restored in that case. There are workarounds you can use in that case, but the difficultly here is that many devices don't have a way to "preset" color (without turning the device on), so Rule Machine isn't able to restore every attribute when the device is off--just the fact that it is/was off.

But it sounds like your problem might be a bit different?

Thanks for looking into it, but unfortunately it works a bit different. It works when bulb is off, but doesn't work when the bulb is on:


  1. Bulb is off
  2. Bulb state is captured by RM
  3. Bulb is set to red by RM
  4. Bulb is restored - set to off - by RM


  1. Bulb is on - on, 100%, temp 2500 - set by scene
  2. Bulb state is captured by RM
  3. Bulb is set to red by RM
  4. Bulb should be restored by RM, but instead of turning white (temp 2500), it stays red. Nothing happens with the bulb in this step.

The first thing I'd look at then is what the bulb reports under "Current States" on its device page after #1 under "Doesn't Work." My guess is that those states are not correct, i.e., do not reflect the real-world state of the device--so then RM (or any app) that tries to read them won't know any better.

The other possibility is that RM is capturing or restoring them incorrectly, but I haven't seen any reports of that yet (though it's possible they made some changes in 2.2.9), so I'd start with the easy target.

1 Like

Good spot. This is what the device reports:

It's on, white, 2500, but it reports colorMode: RGB, which is wrong. When I hit Refresh(), it updates and report the correct status, so I can Add Refresh() to the rule. Thankk you for pointing me the right direction :+1:

Btw the driver is Generic Zigbee RBGW Light, so that one should probably be fixed to report colorMode properly after color to/from white change.