HI All,
I have an automation that tells me my gate is open, with an action notification to close the gate if i hit the button on the actionable notification, it doesnt seem to be working as it automitaclly closes the gate without me pressing the button.
can someone tell whats wrong in the code? for now ive had to disable the switch turn trigger to close the gate to prevent it from automatically closing the gate by itself
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.gate_2
to: "on"
for:
hours: 0
minutes: 10
seconds: 0
condition: []
action:
- service: notify.mobile_app_sm_n986b
data:
message: TTS
data:
ttl: 0
priority: high
media_stream: alarm_stream
tts_text: Gate Left Open
title: "Gate Left Open "
- service: notify.mobile_app_sm_n986b
data:
title: Actionable
message: "Gate Left Open "
data:
actions:
- action: CLOSE_GATE
title: Close Gate
- action: URI
title: GO to Page
uri: /lovelace-new/0
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: CLOSE_GATE
context: {}
timeout: "00:00:10"
continue_on_timeout: true
- service: switch.turn_on
target:
entity_id: switch.sonoff_100114d268_1
data: {}
enabled: false
mode: single