#Garage Port Notification Repeater

24 messages · Page 1 of 1 (latest)

frigid grail
#

I've made this script where I expect to be warned once a port has been opened for 5 minutes. Then it should repeat every 10 minut until I've closed them.

Trace shows: Stopped because only a single execution is allowed at <time>

Running it from the repeat actions gives me a notification but not every 10 minutes.

Any idea on why this is not as stable as I hoped? I guess I have missed something .

alias: Garage not closed warning
description: ""
trigger:
  - platform: state
    entity_id:
      - cover.left_garageport
      - cover.right_garageport
    to: open
    for:
      hours: 0
      minutes: 15
      seconds: 0
condition: []
action:
  - repeat:
      sequence:
        - action: script.notify_about_garage_door_status
          data: {}
        - delay:
            hours: 0
            minutes: 10
            seconds: 0
            milliseconds: 0
      until:
        - condition: state
          entity_id: cover.left_garageport
          state: closed
        - condition: state
          entity_id: cover.right_garageport
          state: closed
mode: single
glass plankBOT
faint escarp
#

Maybe see if that does what you want? Seems like you're manually recreating it

frigid grail
#

Yeah, I like to make stuff from the bottom to learn, I know alert will do it but I dont want to add additional integrations (bloat it up). This should be able to be done plain? 🙂

faint escarp
#

sure

#

so make it mode: parallel

frigid grail
#

But why parallel? It is only a single execution?

faint escarp
#

it's telling you that it's triggering again

#

if that's not what you expect, then you need to investigate that

frigid grail
#

Yeah but if it has already been triggering it shoulld be stuck in the repeat sequence?

faint escarp
#

that message has nothing to do with what's in teh automtion

frigid grail
#

Is there a way to see if it is currently running? (Since it complains I mean)

faint escarp
#

it's just telling you that it triggered again while it's already running

#

yes, but you should just look at the state of the entities in the trigger

frigid grail
#

But that is acceptable. Becuase if it is triggering again while already running it does not need to start another one. Because the "old" one is repeating a message to me. But that is not working. 🙂

faint escarp
#

look for the current attribute for the automation

#

that's unrelated to the log message

frigid grail
#

I think I found the issue, the script is using a Confirmable Action.

alias: Notify about garage door status
use_blueprint:
  path: homeassistant/confirmable_notification.yaml
  input:
    notify_device: 91e4eca61013506cfbe9468515ae8a20
    title: Garasjeportstatus
    message: >
      {% set open_ports = [] %} {% if is_state('cover.left_garageport', 'open')
      %}
        {% set open_ports = open_ports + ['Venstre garasjeport'] %}
      {% endif %} {% if is_state('cover.right_garageport', 'open') %}
        {% set open_ports = open_ports + ['Høyre garasjeport'] %}
      {% endif %} {% if open_ports | length == 1 %}
        {{ open_ports[0] }} er åpen!
      {% elif open_ports | length > 1 %}
        Begge garasjeporter er åpne!
      {% else %}
        Alle garasjeporter er lukket.
      {% endif %}
    confirm_text: Lukk begge
    dismiss_text: Ignorer
    confirm_action:
      - action: cover.close_cover
        metadata: {}
        data: {}
        target:
          area_id: garage
description: ""
icon: mdi:garage

That one is awaiting an answer, I dont want it confirmable just "able to run actions but still ignore if nothing is done". Or am I wrong in expecting this one to be blocking?

faint escarp
#

No idea what's in that blueprint

#

Generally, a wait_for_trigger that can optionally have a timeout

frigid grail
#

Nah, I'll recreate the script without blueprint. It's homeys default one but.. yeah the reason I like do everything from the scratch is that I have control 😛

faint escarp
#

If you're trying to write everything, maybe write that too

#

That's why I don't use any blueprints

frigid grail
#

Yeah. 😄 My plan is that it is a single run, so it cannot be executed twice and start 2 or more loops of "warnings". when i.e. the second port is opened.

Then it should repeat send a message every 10 minutes until I've closed them. Guessing that blueprint is a blocking one so it waits for action before continuing. Therefor it never "loops" as the repeat expect and unless I answer that action i'll be stuck there. 😛