I’m working on a custom alarm panel Lovelace card, written in javascript. I’m implementing a countdown timer on state change (when arming/pending), but it’s complicated since the manual alarm doesn’t publish its “seconds remaining”. So, I’ve rigged up a solution with a separate global timer entity, which works, but the question is what to set its timer to. I’ve had to just hard code some numbers for now, because I would need to set the timer based on what state the alarm_control_panel was in before it changed state (which isn’t a published attribute), and what the configuration settings are for its delay_time and arming_time (which also aren’t published).
Would it be possible to modify the manual alarm_control_panel to publish an attribute of “seconds_remaining”, which counts down when in the arming/pending state. Or, if it’s considered too expensive (like the Timer entity) to update the attribute every second during arming/pending, then it would be helpful to have just an attribute which shows “seconds for this state”, which updates only on state change.
Thanks for any ideas / suggestions.
-John
screenshot of my current work:
2 Likes
I modified the manual component to add a new state_duration attribute, when in the arming/pending state. Sent Pull Request https://github.com/home-assistant/core/pull/41872
My updated custom alarm panel card with countdown timer is at https://github.com/jcooper-korg/AlarmPanel
Hi @johnplanetz I am trying to get the custom alarm panel working as I have just ordered a Konnected board. I have the panel card working but the timer isn’t working. I added the files for the custom component to the custom_components\manual folder and restarted but then can’t find anything in HACs or integrations to add. What is it that I need to do please?
Many thanks and also thanks for putting in the work for this component.
Did you manage to get it going? You won’t see anything in HACS or integrations, but if you’ve set up your configuration properly, you’ll see some entities in the Developer Tools States list.
See the readme doc at GitHub - jcooper-korg/AlarmPanel, and look at the yaml in the ExampleConfig folder.
Hi, I didn’t get it working but I moved on to the custom mqtt android app that someone wrote. But to be honest I’d like to see if I can get either the Ring or Eufy physical keypad to work as they are a bit more tactile than a touch screen (read family friendly)
Yeah a physical touchpad would be nice!
This is by far the best implementation of an alarm panel. I have set it up in an nspanel pro. Works brilliantly.Thank you sir. It is a pity that its not in hacs, but that is not a big deal.
Thanks! Happy to hear that it’s been useful for you!
As for my original question/comments above about the timer durations, they refused my pull request with tweaks to the manual component, and there’s been no further updates to the core to allow me to access the manual alarm config. So, my card now requires that the durations be specified in its own card config.
I red the pull request thread… I was wondering if one can have different timers for different alarms e.g. i want 60 secs if alarm away is pending but in the night i want 15 seconds or less if someone breaks in. How do you handle that?
You can set different delay_time and arming_time durations for the different states in the manual alarm. You can see examples at Manual Alarm control panel - Home Assistant
But, as I’m sure you noticed, my card config currently only supports setting one arming/pending duration for the countdown timer. So, if you set different timer durations in your manual config. the countdown timer in my card may not match up properly. Sorry about that- it’s on my to-do list!
-John
1 Like
Yes i was reffering to your card, i have already configured it in the alarmo panel differently. I hope it is not that difficult to implement.