I got a sensor on my garage that tells me if it is open or closed. I included that sensor (LCN) as a switch (off/on).
Is it posible to customize a Button, that tells me not “off” or “on” but “open” or “closed”? It would be very cool to setup a Icon for “open” and a Icon for “closed”. is that posible somehow?
Its absolutely possible with this custom component.
But to begin with, Is there any problem integrating this as a binary sensor of the device_class garage_door instead of switch? It would have been the best method.
ok. all wrong (I though it was a switch, but it is a sensor for a LED) - sorry
on my lcn I setup a “LED” if the door is open (LED1 on= open; off=closed)
- name: Garagentor Status
address: lcn.s0.m40
source: LED1
Since the source is an LED, it cannot be configured as a binary sensor. In that case, the best option is to create a template cover sensor. Just add the following to the configuration.yaml.
If you have a smart switch that is used to operate this garage door you can change the corresponding entities under the open_cover, close_cover and stop_cover titles. If you dont have any entities just copy the following.