Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103465

Script does not execute

$
0
0

Hi, I have a script which checks if any doors or windows are open and stops the alarm arming if they are. Up until upgrading to 2022.5.3 I assumed this was working fine as no errors were reported. It was during upgrade testing I noticed that a window was open and no notification was triggered. The script fires, but completes without any of the steps executing or any error appearing in the logs. Any suggestions as to the issue?

The script is:

script:
  # script.security_check - confirm all doors are shut and set alarm to on

  security_check:
    alias: security check
    sequence:
      choose:
        - conditions:
            - condition: state
              entity_id: !include ../group_openings.yaml
              state: "off"
            - condition: state
              entity_id: input_boolean.guest
              state: "off"
          sequence:
            - service: tts.cloud_say
              data:
                entity_id: media_player.living_room_sonos
                message: Attention, the alarm is about to arm 
                options:
                  gender: female
                language: en-GB
        - conditions:
            - condition: state
              entity_id: !include ../group_openings.yaml
              state: "on"
          sequence:
            - service: notify.mobile_app_1
              data_template:
                title: "the security system could not arm, {{ trigger.to_state.attributes.friendly_name }} is open please resolve before trying again."
                message: TTS
                data:
                  ttl: 0
                  priority: high
                  channel: alarm_stream_max
            - service: notify.mobile_app_2
              data:
                title: "the security system could not arm, {{ trigger.to_state.attributes.friendly_name }} is open please resolve before trying again."
                message: TTS
                data:
                  ttl: 0
                  priority: high
                  channel: alarm_stream_max
            - service: alarm_control_panel.alarm_disarm
              entity_id: alarm_control_panel.home
              data:
                code: !secret alarm_code
        - conditions:
            - condition: state
              entity_id: input_boolean.guest
              state: "on"
          sequence:
            - service: notify.mobile_app_1
              data:
                title: Attention, guest mode is on, the security system could not arm
                message: TTS
                data:
                  ttl: 0
                  priority: high
                  channel: alarm_stream_max
            - service: notify.mobile_app_2
              data:
                title: Attention, guest mode is on, the security system could not arm
                message: TTS
                data:
                  ttl: 0
                  priority: high
                  channel: alarm_stream_max
            - service: alarm_control_panel.alarm_disarm
              entity_id: alarm_control_panel.home
              data:
                code: !secret alarm_code

Thanks for any assistance you can provide.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 103465

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>