Good morning,
I have correctly configured a number of sensors ( mysensors with serial gateway) .
The sensors are correctly seen as binary_sensors , and as " opening" category.
the only drawback is that the sensors have been like on / off , you can change it to open / close
Would you be willing to provide a pointer or an example of this? I asked the same question in a template thread but got no response. The example in the documentation is a bit confusing and doesnāt really appy to situations like this. I think weād both appreciate the help!
I have to correct myself. You canāt change what the state values are called for a binary sensor, even for the template binary sensor. They are always either on or off. You can change the sensor class, though. But I guess that wasnāt the question.
I had some door sensors but they had that on/off switch, but I wanted them as view only. You can use templates and you can define a status. Check this thread at the end:
I have tested the solution suggested by @bogdan bogdan, and if i use the Dev Tools āTemplate Editorā its work , but if i insert the code in configuration.yaml donāt work.
This is the code that i have insert:
Formatting it exactly this way also eliminates the attribute: none errors on startup as well. I keep meaning to go back and redo my templates this way but I have so many of themā¦
I know this is a REALLY old topic can anyone help me out how to have my drive gates switch show up as open or closedā¦I have tried and tried but jsut given up this is my current code below which works AOK but shows off or on which obviously it isnt!
Been messing around trying to sort this for a little while and kept coming across this post. If anyone wants to do this now in 2020, it is easier. Go to configuration, then to the very bottom under the sub headings General, Server controls, logs and info. You should see āCustomizations. Customize your entitiesā
Once inside find your entity for your binary sensor and change your device class to door. That should do it.
Failing that, typing this is the yaml seemed to work for me
homeassistant:
customize: !include customize.yaml
friendly_name: binary_sensor.garagedoor
icon: mdi:garage
device_class: door