Hi, I have a ZB-SW01 switch from eWeLink, whose entity type is light
, and it works like a button When I turn it on, after a while it turns itself off.
I use it to initiate the opening of the gate.
Instead of light.gate
, I would like to have cover.gate
. How to do it properly?
- i could make in
.yaml
switch.gate
and use the UI helper to change to cover, but that gives very little editing options - in
.yaml
I have already done:
cover:
- platform: template
covers:
garage_door:
device_class: gate
friendly_name: "Main Gate"
unique_id: tplMainGate
value_template: "{{ is_state('light.gate', 'on') }}"
open_cover:
- service: light.toggle
target:
entity_id: light.gate
close_cover:
- service: light.toggle
target:
entity_id: light.gate
it displays as a gate and the opening works correctly, but after a while it shows as closed.
I have no way to add any physical sensor, so how would it be best to set the correct status based on time?
The gate has only one button, when it is pressed it opens and after half a minute it closes. Pressing the button again interrupts the closing and opens again