I have a shutter at my door that I don’t want closing when that door is open.
Any automations that detect the shutter closing while the door is open and then quickly try to reopen the shutter are not fast enough for me.
I thought about using a template cover, I’m hoping I can add conditions in the service calls to “only run when the door is closed”.
So far, I can’t get it to work exactly the way I want.
The actual cover is called “cover.keuken_rolluikachterdeur_cover”. So I’m basically trying to create a template that does EXACTLY what the original cover does only add additional conditions in the service calls.
This works. I can open/close and stop the shutter. However, I cannot see the current position or use the slider. Additionally, the icon displays the “open state” even when the actual cover is closed.
The original cover, there is a slider reporting position:
The template cover, notice there is no slider available:
I don’t understand why this is not working. I’ve used the template editor in the developer tools but this just tells me that the position is retrieved correctly… !
If anybody knows how I could fix this, that would be greatly appreciated.
Also on a side note, if anybody can point me in the right direction of adding conditions to this code (only open/close when door is closed) that would be great.
You don’t have a set_cover_position implemented so the slider won’t work but it should move when cover.keuken_rolluikachterdeur_cover moves.
But why are you even doing this? You’re just making a copy of the other cover that does nothing different accept you have an icon template. But you can use the shutter icons by changing the device_class on your existing cover by customizing it as device_class: shutter. So I’m not really sure why you’re even doing this.
EDIT: Nevermind, I see your comments about adding conditions in the future. Ignore that last paragraph.
Obviously the shutter doesn’t close now when the door is open but I do get this error in my hass instance:
“Rolluik Achterdeur: Error executing script. Error for call_service at pos 1: Template rendered invalid service:”