Another "what sensor triggered my alarm" thread

Hi all

I found a few threads on here with code to help me identify what sensor triggered my alarm but I cant get it working.

the best one so far is the below code but it just tells me that “house” was triggered and not the real sensor.

current code

alias: Beams Triggered MQTT
description: ''
trigger:
  - platform: mqtt
    topic: paradox/states/partitions/BEAMS/bell_activated
    payload: 'True'
condition: []
action:
  - service: notify.mobile_app_s20_ultra
    data:
      message: >-
        ALARM TRIGGERED! Entry at {{ trigger.to_state.attributes.friendly_name
        }}
      title: Beams Triggerd
mode: single

The mqtt trigger does not have a trigger.to_state. It only has these variables:

https://www.home-assistant.io/docs/automation/templating/#mqtt

Sorry that was old code I ended up using the State platform as trigger and it doing the same.

alias: Beams Triggered State
description: ''
trigger:
  - platform: state
    entity_id: alarm_control_panel.beams
    to: triggered
condition: []
action:
  - service: notify.mobile_app_s20_ultra
    data:
      title: Beams Triggered
      message: >-
        ALARM TRIGGERED! Entry at {{ trigger.to_state.attributes.friendly_name
        }}
      data:
        ttl: 0
        priority: high
mode: single
1 Like