Rule Machine only supports some states for Power Source?

According to the Driver Capability List, powerSource is an enum with four values: "battery", "dc", "mains", or "unknown".

However, in Rule Machine, it appears that when you wait for events, you can only wait for the states "battery" or "mains".

Shouldn't all four values -- or at least the three known ones -- be supported? I'm currently working around it by waiting on the device to change when it's already on battery, and I know the device can only change to DC. But this seems like an odd gap.

1 Like

Tagging @bravenel.

I'll get that fixed for the next release.

3 Likes

It might be simpler to use "Custom Attribute" for the trigger and then select "powerSource" and "dc" as shown below:

1 Like

Thank you both, @bravenel and @aaiyar!

1 Like