jasonmadigan / ha-hkc

HKC Alarm integration for Home Assistant
10 stars 4 forks source link

"In Alarm" Sensor #28

Closed jmccrohan closed 1 month ago

jmccrohan commented 3 months ago

Hi Jason,

I had the alarm in full set (away) mode this morning and one of the zones triggered (neighbour's ball hit off window). I was out of mobile coverage at the time so only got the HKC Alarm notification after about 20mins.

Unset and reset via HKC app and all was good. From a HA perspective, the alarm_control_panel entity didn't change status, but the individual zone sensor did change to open for 60 seconds (polling interval).

How are you detecting when the system in alarm within HA? Rather than try to emulate the different zone state and alarming logic, is it possible to add an "in alarm" sensor? I'm tight on zones on my panel so I'd rather not have to map a panel output to siren and wire it to an input, but it's an option if it can't be detected via the API.

Cheers, Jon

github-actions[bot] commented 2 months ago

Stale issue message

jasonmadigan commented 2 months ago

I started working on this a few months back, but testing when triggering alarms was annoying for those around me at the time. Right now - triggered alarms are not actually exposed or tracked. Needs to be picked back up. Needs some changes in pyhkc too.

The exposed alarm_control_panel should support a triggered state, and AlarmControlPanelEntityFeature.TRIGGER. I'll pickup again.

github-actions[bot] commented 2 months ago

Stale issue message

jasonmadigan commented 1 month ago

@jmccrohan I think I've added this via https://github.com/jasonmadigan/ha-hkc/commit/0abe7a600d9b0790f44f086cf33086a6a4aa3a69 and release 1.0.19. I've not tested yet, but it should work.

jmccrohan commented 1 month ago

@jmccrohan I think I've added this via 0abe7a6 and release 1.0.19. I've not tested yet, but it should work.

Thanks. Just tested it there and it works perfectly.