I have a binary tilt sensor on my manual lift garage door; right now it gets ported over by the HomeKit Controller integration to the iOS home.app as a motion sensor. Which is fine, the home.app alerts me when “motion is detected” when I pull the door open.
But I would much rather the home.app think the tilt sensor is an actual garage door (cover); icon, behavior and all by alerting me in the same manner that it does for my automatic garage door ("The garage door has opened). But obviously, it would lack the ability to open and close the door (since this particular door is a manual lift)… which is where the dummy part is. It doesn’t automate the opening and closing, just alerts that the door is opened and closed.
Am I dreaming in semantics, or is it possible to get to where I’m thinking I want to be?
Thanks for pointing that out; I’ve written up the following, but it’s half working.
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: "Garage Door"
value_template: '{% if states.binary_sensor.garage_door == "on" %}
Open
{% else %}
Closed
{% endif %}'
open_cover:
service: script.open_garage_door
close_cover:
service: script.close_garage_door
Starting with the physical door in the closed position; when I manually open it, the binary sensor fires to the “on” state. However, the cover created above, remains “closed”. If I go to the developer tools, and manually change the state of the cover to “open”, it does change to open. Then, I manually close the door, and the binary sensor changes to “off” AND the cover changes to “closed” like I would expect.
Any ideas to get it working without manual intervention?
I think I figured it out:
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: "Garage Door"
value_template: "
{% if is_state('binary_sensor.garage_door', 'on') %}
Open
{% else %}
Closed
{% endif %}"
open_cover:
service: script.open_garage_door
close_cover:
service: script.close_garage_door
Now I’d like to get rid of the open and closed scripts if I can, since the sis a manually opened and closed garage door. I don’t have an opener.
1 Like
Just to close this out; I read up on the home kit documentation and found what I really wanted was the template binary sensor, not the template cover. Since I’m not looking to CONTROL the door, just report on it.
Once I did that, I got exactly what I was looking for. A door entity ported to HomeKit that notifies me when it’s state changes.