Tooias
March 25, 2024, 8:59am
1
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?
francisp
(Francis)
March 25, 2024, 9:09am
2
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
myle
(StePhan McKillen (Other kiwi Here))
March 25, 2024, 9:11am
3
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
Tooias
March 25, 2024, 9:26am
5
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?
myle
(StePhan McKillen (Other kiwi Here))
March 25, 2024, 9:33am
7
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
francisp
(Francis)
March 25, 2024, 9:35am
8
That is not difficult
Does not mean that the natural state is not on/off