Sensor_class windows shows only on/off

I have some binary window sensors. I gave them sensor_class “opening” and the are shown as opening in the dev tools. But it shows on/off only.

What can i do?

https://community.home-assistant.io/t/4653

I don’t understand. Doors have the same sensor_class… its opening. The same with windows. Or what do you mean?

All binary sensors report their state as on/off currently. That is the feature request to be able to customize the text. It’s not possible currently. Your only option is use a template sensor, but then you lose the icon that the binary sensor uses.

1 Like

Sensor class is mainly used to determine what default icon to show. (Just found this out last week.)

1 Like

Why is the manual saying something else?

Manual Binary_Sensor: Most binary sensors support the sensor_class: which let you specify the type of your sensor.

Is this feature still on todo?

No, that feature works. You’ll notice that by changing the sensor_class, the icon will change. It just doesn’t change the text. That’s essentially what the feature request I linked to is asking for.

1 Like