Binary_sensor with the device_class: problem as trigger

Hello all,

I have a problem with a binary_sensor with the device_class: problem.

According to the documentation, I have to use the status of “on” and “off” for the trigger in the automation.

However, for the automation to work, I had to use the values “ok” and “problem”.

How can that be?


A binary sensor may show ‘ok / problem’ in the frontend, but it’s state is always on or off.

You can check the state in developer tools → states

Binary sensor on have a state of a on / off

your home work

LOL

Hmmm. But the docs say:

Where binary sensors differ is they can only return one of two mutually exclusive values. For example, a binary sensor for a window may report a value of open or closed, a switch on or off, a condition true or false

and his trace shows problem/ok

I’m not expert in this but i see how it’s confusing to op

I am familiar with the theory.
However, things look different in practice.

1 Like

yeah, just created a template problem sensor and it does indeed enforce on/off

so I am baffled as to the trace op posted

@Tooias , where did that power sensor come from?

the automation is LOOKING at the

state:

so it waiting for a state change of on / off

looking the the automation editor

is

but the Yaml says

1 Like

That is not difficult

Does not mean that the natural state is not on/off