I am looking to use a door sensor to update my garage door opener device entity to tell if its open or not. I have the opengarage door opener and its has to be placed in an area that is not able to sense if the garage door is open or not. The problem with this is that I can ask Google to close the garage door which will open it because it shows as perpetually open. I have a door sensor that I would like to update the entity instead of relying on the sensor built into the opengarage device. is this possible?
You’d want to create a template cover that uses the state of the sensor to report if the door is open or closed, while it controls the opener.
I’ll check this out. Thank you for the response
I am not sure what the template for the sensor should be. in the example it shows
{{ states('sensor.garage_door')|float > 0 }}
and I put my own sensor in but i get an error in the template editor: ValueError: Template error: float got invalid input ‘off’ when rendering template {{ states(‘binary_sensor.lumi_lumi_sensor_magnet_aq2_opening’) | float > 0 }} but no default was specified. What am i doing wrong? Here is what I see on the state:
Here is the full solution I used:
cover:
- platform: template
covers:
garage_door:
device_class: garage
unique_id: {used a random number here}
friendly_name: "The Garage Door"
value_template: "{% if 'on' in states('binary_sensor.lumi_lumi_sensor_magnet_aq2_opening') %} open {% else %} closed {% endif %}"
open_cover:
service: script.garage_door_open
close_cover:
service: script.garage_door_close
I created scripts for opening and closing the garage door and named them as listed in the open and close cover. thanks again @Tinkerer for the help