@Tinuva : So I am trying your recommendations but still a bit thick in understanding how it works. Sorry
Looking at your code was also confusing as many of my zones have a very similar name , so I was wondering if we had the same installer then realised my guy only used to do paradox and yours is a DSC.
In my learnings, I picked up that if a zone was called 'Front O/D Beam' in the alarm and then was first brought by PAI into HA, it would be called Front_O_D_Beam .If I then renamed the zone, on the Alarm to say 'Front OD Beam', then two entities end up in HA. The old one and the new one as Front_OD_Beam. I decided to delete the whole PAI MQTT topic and bring them in again. So at least it's all cleaner now and I've fixed up all my bypass and other switches that I had to use the names, including front end.
So the first step is to group the sensors/switches for the various states, armed away, armed home into a group. Using your rule, is why I started renaming alarm zones to be more standard e.g. PIR / Door / Window at end of zone name. But I have two partitions and it's the external partition which is first put into armed home and then armed away state every night. The interior partition is only armed if no one is at home.
But I just can't work out what I should be doing to get a notification and was wondering if
@xrapidx or someone with Paradox alarm could share their notification code or automation. In my case, it's simply just going to be a HA notification (don't need Signal, telegram or anything else).
Example of binary switches/sensors I currently have for every alarm zone which appear in HA and can be used.
YAML:
#Alarm Zones
####Carport PIR
- platform: mqtt
state_topic: "paradox/states/zones/Carport_PIR/open"
name: "Carport PIR - status"
payload_on: "True"
payload_off: "False"
device_class: motion
- platform: mqtt
state_topic: "paradox/states/zones/Carport_PIR/was_in_alarm"
name: "Carport PIR- was in alarm"
payload_on: "True"
payload_off: "False"
device_class: motion
- platform: mqtt
state_topic: "paradox/states/zones/Carport_PIR/alarm"
name: "Carport PIR - Alarm!"
payload_on: "True"
payload_off: "False"
device_class: motion
YAML:
#Alarm Zone Bypass Switches
####Carport PIR
- platform: mqtt
state_topic: "paradox/states/zones/Carport_PIR/bypassed"
command_topic: "paradox/control/zones/Carport_PIR"
payload_on: "bypass"
payload_off: "clear_bypass"
name: "Carport PIR - Bypass"
state_on: "True"
state_off: "False"
####Garage Outdoor PIR
- platform: mqtt
state_topic: "paradox/states/zones/Garage_OD_PIR/bypassed"
command_topic: "paradox/control/zones/Garage_OD_PIR"
payload_on: "bypass"
payload_off: "clear_bypass"
name: "Garage Outdoor PIR - Bypass"
state_on: "True"
state_off: "False"
My logic (poor logic) is telling me since I have the Alarm switch for each zone, I should be able to plug them all into an automation as a trigger and then send a notification if Alarm is in away/armed_home state.
YAML:
alias: ALARM - TEST NOTIFICATION
description: ''
trigger:
- platform: state
[B] entity_id: binary_sensor.carport_pir_alarm[/B]
from: 'off '
to: 'on'
for:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
condition:
- condition: state
entity_id: alarm_control_panel.perimeter
state: armed_away
action:
- service: notify.mobiledevicesonly
data:
title: [B]ALARM in ZONE XXXXX[/B]
mode: single
For the above code, is what I am showing below , the correct way to add every zone into the trigger section that I am interested in receiving a notification for?
YAML:
trigger:
- platform: state
entity_id:
[B] - binary_sensor.carport_pir_alarm
- binary_sensor.front_od_beam_alarm
- binary_sensor.xxxx_alarm[/B]
from: 'off '
to: 'on'
for:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
Second and this is I guess the part, where I show how dense I really am. How do I change the message body to show the name of the zone that triggered
YAML:
action:
- service: notify.mobiledevicesonly
data:
title: ALARM in ZONE[B] XXXXX[/B]
mode: single
I don't want to give up and need to sort this crap our as my insite gold app expires tomorrow and I hope not to pay them again. Even the Wife is happier to manage alarm inside HA.