Hello
I have just looked into Template cover for my garage door. I have a magnet sensor that has the states “on” and “off”, on being an open door. I have made a sensor of it that returns “Åpen” and “Lukket”.
When I hen try to use that sensor in my template cover nothing happens. The state of the cover is “open” whatever I do.
Also, if your sensor.garage_door returns Apen or whatever, you can’t use it as a position_template. A position template requires a number between zero and 100.
But, if the binary_sensor is just a template… don’t even bother with the binary sensor and put whatever the binary sensor’s template into the value_template
Remember, translation is handled by home assistant. So if you select the appropriate language for your system, you should always try to let that handle the translations. Less work for you and it makes your code work everywhere because you’re using the untranslated values. Then when you have someone else visit and use the system, they can swap the language to what suits them without impacting your code. Or without it impacting their ability to read statuses.
Thank you. I tried the first code you gave me since I already had a binary_sensor.garage_door that reacts to my magnet door switch (switch.garasjeport_sensor_3) But now the whole cover is greyed out in the front end.
But If I were to use the second code I can use the switch in the template_value?
I have a relay switch connected to my garage door motor that open and close the door. That is switch.garasjeport. That works. But in order to see if the door is open or closed I have a magnetic switch (switch.garasjeport_sensor_3) that is off or on. When door is open the magnetic switch is “on”.
I made a sensor called sensor.garage_door that gives me the states “Åpen” or “Lukket” based on the state of the magnetic switch. This sensor works.
The garage door motor opens the door if it is closed, and closes it if it is open. It does not reflect the state. The relay switch just give the motor a signal like a remote or physical button hardwired to the motor.
So I put turn on service on all, since the relay switch turns on for a moment to move the door.
Hi there, I am excited that I found this thread but I still don’t know enough about HA to use it. I have a garage door that has a zwave wireless door sensor on it. I also have a Remotec ZFM-80 zwave relay on the switch. (I had this working on SmartThings for a couple years before I bailed).
On HA, my components are called:
switch.garage_main_door_relay
binary_sensor.garage_main_door_closed
I see the code above, but I don’t know where to put it. This relay needs to be turned off a couple seconds after it is turned on so I’ll have to add that as well with a delay - shouldn’t be a problem.
I don’t quite understand what a cover is. Can anyone point me in the right direction on using this code so I can have a garage door icon on my dashboard? Thank you!
UPDATE:
I wanted to report back that I pretty much used the code above and just put in my own switch and relay names. Since the relay needs to be shut off, I just made an automation in the UI that turns it off if it has been on for 3 seconds. Worked great the first time. Thanks again!
My Garagedoor stays open no matter what I do. I use a switch as “opener” (switch.garage) and have a binary sensor as well…state sensor (binary_sensor.garagentor). This is my current code
I tried to replace position_template with value_template but this had the effect that the entitiy was not available. I also tried to put an “on” or “off” behind binarysensor line.
Currently the door is closed. Means the sensor shows off.