abodepy
abodepy copied to clipboard
Set alarm state to "triggered" when alarm is activated?
Is there any way to set the alarm state to "triggered" when the alarm is activated? I noticed it's being reported in the Home Assistant debug message:
2019-05-25 17:19:25 DEBUG (SocketIOThread) [abodepy.event_controller] Timeline event received: Front Door Interior Alarm Activated - Interior Alarm Activated (1132)
Here is the json data when the alarm is triggered:
[{
"id": "743443290",
"event_utc": "1558831901",
"date": "05\/25\/2019",
"time": "05:51 PM",
"event_cid": "",
"viewed_by_uid": "0",
"verified_by_tid": "743443663",
"event_code": "1132",
"event_type": "Interior Alarm Activated",
"color": "#cc3f44",
"user_id": "",
"user_name": "",
"mobile_name": "",
"parent_tid": "",
"app_type": "",
"device_id": "SR:PIR",
"device_type_id": "9",
"icon": "assets\/email\/alarm-activated.png",
"device_name": "Living Room Motion",
"event_name": "Living Room Motion Interior Alarm Activated"
}, {
"id": "743443285",
"event_utc": "1558831900",
"date": "05\/25\/2019",
"time": "05:51 PM",
"event_cid": "",
"viewed_by_uid": "0",
"verified_by_tid": "743443663",
"event_code": "1132",
"event_type": "Interior Alarm Activated",
"color": "#cc3f44",
"user_id": "",
"user_name": "",
"mobile_name": "",
"parent_tid": "",
"app_type": "",
"device_id": "RF:XXXXXX",
"device_type_id": "4",
"icon": "assets\/email\/alarm-activated.png",
"device_name": "Front Door",
"event_name": "Front Door Interior Alarm Activated"
}]
There's an abode_alarm event when the alarm triggers. I have an automation set up using this event. See https://www.home-assistant.io/components/abode/
Ah I forgot about those. This will work for now. I have all of my devices exposed to HomeKit where I have most of my automations setup. I was hoping to be able to create the automation through HomeKit based on the Abode Alarm status being changed to a triggered state. I suppose I could make a separate template switch based off the events but it's not a big deal. Supposedly Abode will have native HomeKit support soon.
Oh gotcha, makes sense. Yeah who knows when it'll be supported but they have said it will be.
Do Home-Assistant alarms have a "triggered" state now? So instead of watching for an alarm event you can instead just have an automation watching for a state change to the actual alarm entity?
So apparently a triggered state does exist in the manual alarm control panel. Apparently though you can't set to_state
as triggered, but you can use triggered in from_state
https://www.home-assistant.io/components/manual/
Do Home-Assistant alarms have a "triggered" state now? So instead of watching for an alarm event you can instead just have an automation watching for a state change to the actual alarm entity?
Yeah, there's a triggered
state for alarm control panels in Home Assistant. HomeKit also has a triggered state. I just manually set the alarm control panel state to triggered
and it shows up as triggered in Home Assistant and HomeKit.
Not sure the most elegant way to implement this would be. Is it possible to just read the event_code
from the JSON data packet that is pushed from the Abode servers to set the state from Abodepy to triggered (if event_code matches any value really unless we wanted to break it up by alarm types). Wish I wasn't such a python newb so I could be more helpful. :)