Dear All,
i have RF broadlink command to open gate of my home.
I don’t have any sensor to identify the status, simply when i open the gate (with the command) this is automacally closed after 60 secs.
How i can define cover template with default status closed, that switch in open status when i send the command and then go back on closed after 60 secs?
I dont have found a way to do it. Any suggestions?
This is the script to open gate with broadlink rf command:
script:
apri_cancello_garage:
sequence:
- service: remote.send_command
target:
entity_id: remote.wi_fi_universal_remote_remote
data:
device: cancello_garage
command: apri
Thanks
Massimo
tom_l
February 9, 2022, 11:19pm
2
Turn an input boolean on
in your script.
Then create an automation to turn off the input boolean if it has been on for 60 seconds,
trigger:
- platform: state
entity_id: input_boolean.your_gate_input_boolean_here
to: 'on'
for:
seconds: 60
action:
- service: input_boolean.turn_off
target: entity_id: input_boolean.your_gate_input_boolean_here
Use the state of the input boolean in your template cover:
value_template: "{{ is_state('input_boolean.your_gate_input_boolean_here', 'on' ) }}"
Also, welcome to the forum, please have a read of point 11 here .
Ciao tom,
i need to installa some other integration?
i have error on confiuration yaml when i try to reboot:
script:
apri_cancello_cortile:
sequence:
- service: remote.send_command
target:
entity_id: remote.wi_fi_universal_remote_remote
data:
device: cancello_cortile
command: apri
trigger:
- platform: state
entity_id: input_boolean.your_gate_input_boolean_here
to: 'on'
for:
seconds: 5
action:
- service: input_boolean.turn_off
target: entity_id: input_boolean.your_gate_input_boolean_here
cover:
- platform: template
covers:
cancello_cortile:
device_class: garage
friendly_name: "Cancello Cortile"
value_template: "{{ is_state('input_boolean.your_gate_input_boolean_here', 'on' ) }}"
open_cover:
service: script.apri_cancello_cortile
close_cover:
service: script.apri_cancello_cortile
Thanks
Ok probably i have now correctly understood your suggestion. Let my try an i let you kmow
Hi Massimo,
how did you solve your issue?
Could you provide your configuration, please?
Many Thanks