Template Helper - Changing a Switch to a Cover

Ok, before we begin please do not laugh at me. I am not a programmer and use strictly the GUI when building 90% of my automations.

Recently I acquired a Thirdreality Garage Door Opener which is basically just a finger that presses an existing garage door opener’s button to open and close the garage. The button is either OFF, garage door closed. Or ON, garage door Open.. It knows if the garage is open or closed due to a tilt sensor that is paired directly to the Thirdreality garage door opener. This allows it to turn the switch ON or OFF according to the tilt sensor.

Now instead of a Light Switch, which is what HA sees when you integrate this opener, I wanted the HA controls to be a Cover so that it will function just like my other integrated garage door openers. So I was told that a Template Helper was the right solution for this. I created a Template Helper and got it to work…sort of. There are some parts I do not understand.

What do I place in the STATE area… Here:

Also what do I put in the POSITION area. Here:

As you can see at the bottom of the page above, I was able to create a Helper that sort-of works. However though it will cause the garage door to go up and down, it does not graphically show it. Please help me fill in the two missing parts above.

In the state template area:

{{ states('light.garage_emergency_garage_door_opener') }}

Ignore the position template. You don’t have anything you could use there.

@tom_l BRILLIANT!!

That worked perfectly! I hate to ask this, but how did you know that line should be in the state area? What exactly does it mean?

Thank you so much!

Home Assistant uses jinja for its templating tool, you can read about it here:

You rock! Thank you so much.

templating is not necessary, just use the built-in Show As property on the entity itself…

That does not work, lights do not have a “show as cover”. That’s only switches.