Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more detailed alarm triggered states #231

Closed
austinmroczek opened this issue May 11, 2019 · 2 comments
Closed

Add more detailed alarm triggered states #231

austinmroczek opened this issue May 11, 2019 · 2 comments

Comments

@austinmroczek
Copy link

Per initial discussion at home-assistant/core#23709

Also, this conversation is similar to #54

Right now there is only one alarm control panel state for when the alarm is "going off". This is STATE_ALARM_TRIGGERED in homeassistant/const.py.

I would like my automation to respond differently if it's a burglar (turn on siren, announce police on the way) or fire (unlock doors, turn on lights, turn off fans) or carbon monoxide (open windows, turn on fans).

Here are the options I see to add this functionality:

a) My original request was to add new states to homeassistant/const.py

STATE_ALARM_TRIGGERED_FIRE_SMOKE
STATE_ALARM_TRIGGERED_CARBON_MONOXIDE

b) Use a state attribute to add detail to the existing state, per @andrewsayre suggestion

I assume it would be something along the lines of:

states.alarm_control_panel.my_alarm.attributes["trigger_type"]

Then trigger_type can be defined by specific components as needed.

Are there other possible solutions?

What are the pros/cons of each, and suggested path forward?

@balloob
Copy link
Member

balloob commented May 13, 2019

I like B but call it trigger_source.

@austinmroczek
Copy link
Author

When you said trigger_source, I was thinking sensor name/location. For example, I have five smoke alarms, each with a name like "Master Bedroom Smoke."

Perhaps we have two different state attributes, one for trigger_type and one for trigger_source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants