The conditional button is a good idea. Would you mind sharing your solution for others that may be interested?
Sure. Here is the complete code:
fire_event has to be set to true in order for the automation to trigger:
system_log:
max_entries: 50
fire_event: true
I use two input_booleans. One to keep track of the warning and one to reset it:
input_boolean:
reset_alarm_panel_warning_button:
initial: off
alarm_warning_present:
initial: off
Here is the automation to catch the error and reset it:
automation:
# ALARM Panel Notifications #
- alias: Create notifications for Invalid code errors
id: create_notification_alarm_panel_id
trigger:
platform: event
event_type: system_log_event
condition:
condition: template
value_template: '{{ "Invalid code given" in trigger.event.data.message }}'
action:
- service: input_boolean.turn_on
data:
entity_id: input_boolean.alarm_warning_present
- alias: reset_alarm_panel_warning
id: reset_alarm_panel_warning_button_id
initial_state: 'on'
hide_entity: True
trigger:
- platform: state
entity_id: input_boolean.reset_alarm_panel_warning_button
to: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.reset_alarm_panel_warning_button
- service: input_boolean.turn_off
entity_id: input_boolean.alarm_warning_present
And finally the Conditional Lovelace card:
card:
entity: input_boolean.reset_alarm_panel_warning_button
hold_action:
action: more-info
icon: 'mdi:delete'
icon_height: 30px
name: Wrong Code Entered. Please Reset and try again!
show_icon: true
show_name: true
type: entity-button
conditions:
- entity: input_boolean.alarm_warning_present
state: 'on'
type: conditional
tom_I,
Any good suggestions on how to catch the ARM HOME and ARM AWAY button click and have them fire an automation?
My problem is that if a monitored sensor is left in the open state, the alarm won’t arm, but I won’t get a notification about what the problem is in lovelace and the state of the panel won’t change either since the alarm never arms. The physical alarm panel however will start beeping.
If I could trigger an automation by the button press, I can check if all required sensors are closed and if not throw an error.
I’m using the bwalarm custom component. I has a panel for easy sensor inclusion editing, mqtt, pending and delay times adjustment and much, much more. Can be installed with HACs.
A trigger like this catches the warning state for bwalarm. Not sure if it works with the standard manual alarm.
- id: alarm_warning
alias: '[Alarm] Warning'
initial_state: true
trigger:
platform: state
entity_id: alarm_control_panel.house
to: warning
action:
In my case I use the Concord232 Alarm Panel. There is no warning state.
The only way I would catch the problem is by catching the actual button press on the Lovelace Control Panel.
The component itself just sends an arm command to the Concord232 Server. The Lovelace Alarm panel will first change to arm when the regular update of the component tells it that the status has changed to arm.
The custom component is an improved replacement for the built in manual alarm panel. If your alarm works with the built in alarm panel it will work with bwalarm.
It looks identical in Lovelace but has an added side panel.
Ok, Thanks. I will check it out
There are a lot of options to set up but it is well worth it.
Mybe I’m missing something, but that seems more like a Manual Alarm Panel where HA is in charge of monitoring Sensors. Concord232 integrates with Concord Alarm System. Don’t see how it can be a replacement for the Concord232 alarm panel.
Yes that’s what I said.
Yes, so it won’t work with Concord232
So is your physical alarm panel armed in this case or not (have no idea what that beeping means)?
And how would you know what the problem is?
No it doesn’t ARM. It just continous making sound until I close the door thats open or og go to the physical alarm panel and shut it off.
So that way it warns you about open doors/windows? And what automation would you like to use to deal with it?
If I had a way to detect when the button is clicked I could make an automation that checked it the required door were closed and if not create an alert within HA as to which doors/windows were still open.
What about displaying that something is not closed? I know it’s not ideal, but should work if you have only one mode/set of sensors…
I would prefer it the other way, but I could put the Alarm Panel on a Conditional
card. If required sensors were closed show the Alarm Panel and if not show the sensors not being closed.
Kind of, yeah… as I said, it’s not ideal. To get the idea hot to intercept button press, you’ll probably need to read custom alarm card’s code
Thank you for this cool script!
It did not work for me at first, since the template condition would always return false
.
I had to change the condition to
value_template: '{{ "Error on set_alarm" in trigger.event.data.message.0 }}'
notice the 0
, to access the first entry of the list.
Now it works like a charm!