#Cover template

1 messages · Page 1 of 1 (latest)

signal robin
#

Hello all!
I want to make a template for a garage door by using my garage opener + an external sensor.
Currently I have two separate entities that I want to combine into one:
Cover entity
Binary_sensor entity
The external sensor shows as a binary_sensor, with the state "on" when the door is closed, and "off" when it is open.
How can I combine the two into one cover?
I got a lock template working, but I want to make it into a cover template, with a garage door showing… not sure how to do that :/

Here is my lock template:

lock:

  • platform: template
    name: Garage Gauche Template
    value_template: "{{ is_state('binary_sensor.push_button_6_2', 'on') }}"
    lock:
    service: cover.open_cover
    target:
    entity_id: cover.garage_gauche
    unlock:
    service: cover.close_cover
    target:
    entity_id: cover.garage_gauche
hasty stream
signal robin
#

The only thing where I struggle is with this line:
value_template: "{{ states('sensor.garage_door')|float > 0 }}"

#

can I just put my binary sensor there?

hasty stream
#

Yes.

#

Except the template needs to be "false" when closed

#

{{ is_state('binary_sensor.push_button_6_2', 'off') }}

signal robin
#

Ok I'll try, thanks a lot !

hasty stream
#

And device_class: garage to let it look like a garage door

signal robin
#

looks like it works ! thanks a lot @hasty stream !