I want to make an entity that has four states for a garage door controller.
The four states would be:
Open
Opening
Closed
Closing
I have one zwave door sensor to report closed status.
I have one zwave relay that triggers the garage door to open and close.
Are there any examples that I could look at which makes use of multiple binary inputs and switches, to report into a single entity that has different icons based on the state?
> 0 is true if the number is greater than zero. Although I donât really understand this as the binary sensor is only 1 or 0. It would make more sense if the value was, say, a number between 0 and 100.
Itâs saying there are duplicate keys for service there, because there is. Guessing I have to go about doing multiple things under each section differently. Anyone know how I would do what Iâm trying to do above correctly?
Iâm trying to use the garage cover but with all four states. I canât figure out how to get it to use the âOpeningâ and âClosingâ states for some reason - all it shows is Closed and Open. I have automations set up to toggle the four input_booleans accordingly. Do I have to do anything different or am I going about this the wrong way?
Defines a template to get the state of the cover. Valid values are open / true or opening / closing / closed / false . value_template and position_template cannot be specified concurrently.
I have four automations that key off the physical zwave switch. Those move through the four different states. Maybe theyâre not needed if I can get all four states in the cover working properly.
I just saw in another post something like this that I will try tomorrow morning:
open_cover:
- condition: state
entity_id: cover.garagedoor
state: 'opening'
close_cover:
- condition: state
entity_id: cover.garagedoor
state: 'closing'
How do I set the state of the garage cover in an automation? It seems that by default the garage cover only supports open/closed by default and Iâm going to have to set the âOpeningâ and âClosingâ states myself. Am I understanding that right? I canât figure out how to set the state of it to try it out for some reason.
When I set the flag for opening to âonâ in the developer tools, the icon changes on the garage cover, but the state doesnât change. It stays showing âClosedâ. Anyone have any idea why it is not working when I set the opening flag to âonâ? I tried setting it to both opening and Opening and there wasnât any difference.
If you just make four input_booleans and make a garage cover with the code above, then manipulate the input_boolean switches, I would expect that the state of the cover would be able to change to opening and closing depending on which I input_boolean I have turned on.
You can see that the Open and Closed work as I think those are the defaults. But the switches for Opening and Closing donât change the state of the cover.
Yeah I canât figure this out. Sort of giving up I guess until I can learn something Iâm doing wrong but I canât figure out what that is. Any tips or pointers would be appreciated.
I see it right there in the code that it supports all four states. Any idea how I can turn on logging or something so I can debug why itâs not working? The icons change just fine, but the state wonât change. The only states it will show is âClosedâ and âOpenâ no matter what.
Here the code Iâm working with along with four boolean_inputs to test it: