add reversed device_class (eg Safety 'on' = Safe) to binary_sensor #22030
Replies: 1 comment
-
sorry this is for FR in the community as its about backend functionality. I copied it there https://community.home-assistant.io/t/add-reversed-device-class-eg-safety-on-safe-to-binary-sensor/772487 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
not sure how to best describe this, but what we now have are all 'incidents' on the device_class name.
problem on means problem,
moisture on means leakage
motion on means motion
etcetc
however, Looking for a device_class to indicate a positive safe situation in 'on', I checked
device_class: safety
, because the name implies that is the correct class for safety.However, from the mentioned perspective above it is doing the exact opposite thing:
Safety 'on' means unsafe. Safety 'off means safe
In other words, we cant use this, or any other binary_sensor device_class to have a 'safe' default situation, and have it toggle on the exception.
hence this FR Discussion, to add a class that has 'on' for state when all is good, Safe, and 'off' in the not safe situation
(yes I did check the theme colors, have them set, but can not change the icon there, which remains using the opposite logic. Also, the involved binaries are complex template entities, and it would become really hard to rewrite those and inverse completely.
A 'simple' device_class with describe logic would be ever so helpful.
Thanks for considering
Beta Was this translation helpful? Give feedback.
All reactions