I have a new sensor it is already in HA and I want to say that when the door sensor is open, the garage door is also open. The garage door is the cover in this case.
The problem now is when I’m opening the garage door it continu says opening because there is no sensor. With this door sensor I’ve tried this with an automation, a value template, … but in al of those cases it creates a whole new “device” or “Entity” but that is not what I want.
I just want to let the sensor say “Ok the door is open”, “door is closed”. It’s a magnetic door sensor. And that my existing garage door get the state of the sensor.
Just tried this but now the garage door is open or the start state is open, even when it is close. and the sensor is also closed.
It’s a very complex thing. because now when I’m opening the garage door, the switch stays active. So I need to deactivate the switch again, and after that I’m able to close to garage door. So for the full open/close movement I need 4 presses. 1 to open, 1 to deactivate the switch, 1 to close, 1 to deactivate the switch. Because I’m using the original switch now in my value template…
Not really. You need to call scripts instead of teh switches directly. The script would turn the switch on to open the garage and then turn off the switch immediately so it is always in the off position.
Alternatively, you can create an automation that just turns the switch off every time it turns on.
And is there any chance you could help me with this? Never used scripts in HA.
I’ve already tried this with an automation, but this also creates a new entity… And to be honest, the knowledge to achieve this with an automation/script, I don’t have this. It is very much copy paste from the internet and hopefully some code works…
This works surprisingly very well! The button is indeed deactivate automatically after 1 sec! Just a little remarks and maybe you can help me with this, the sensor don’t work now for the state. So even when the sensor is open/close the door won’t get that state…
I’m excited to tell that your solution works. It was because I changed the line of the value template. I’ve set it back to the original line of me and now everything works as it should be!
Many thanks for this help, was looking for ages for this! Can I hide the automation, so that it is working always but I don’t see the rule or icon, everything from HA is connected with the homekit integration. So in homekit I now have an extra icon to turn on/off this automation… Don’t need this of course in homekit…
Untested btw. Just typed from the example…You probably can also exclude your switches and all and just keep the new cover template entity.
I personally rather use ‘includes’ rather than ‘excludes’ for things like this so I can control what gets automatically pushed into other systems as I create new things. But this will require you to look at what you need in homekit and add includes for all of them.