Skip to content

Add support for alarm control panels in android auto #3765

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

Merged
merged 5 commits into from
Aug 7, 2023

Conversation

dshokouhi
Copy link
Member

@dshokouhi dshokouhi commented Aug 7, 2023

Summary

Fixes: #3710

We will show Alarm Control Panels as a supported domain because they are important enough IMO.

Only if we detect a code is not required will a user be able to click on it, otherwise it will be non-actionable.

Given the use case we will either disarm or arm_away the alarm, the other arming options don't feel as if they would be used as much as armed_away

Used the same icons from the frontend: https://github.com/home-assistant/frontend/blob/858dd738684b604b7861ccb9e2c449f9280f8723/src/common/entity/alarm_panel_icon.ts#L15-L36

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#968

Any other notes

After going on the first road trip this weekend the question of "did we turn on the alarm" came while in the car and it would've been easy to answer that 😂

@jpelgrom
Copy link
Member

jpelgrom commented Aug 7, 2023

Looking at the card example, it suggests that it is possible for an alarm to only support disarm and arm_home. Should there be a check on supported features to handle this?

@dshokouhi
Copy link
Member Author

Looking at the card example, it suggests that it is possible for an alarm to only support disarm and arm_home. Should there be a check on supported features to handle this?

the docs around configuring the domain do not show you can turn off the other alarm types.

https://www.home-assistant.io/integrations/manual
https://www.home-assistant.io/integrations/alarm_control_panel.template

@dshokouhi
Copy link
Member Author

I see what you mean there is indeed supported feature support here, so will add a check to make sure the entity properly supports the action.

https://github.com/home-assistant/core/blob/dev/homeassistant/components/alarm_control_panel/const.py#L28

@jpelgrom
Copy link
Member

jpelgrom commented Aug 7, 2023

One more thing: the friendlyState function should be updated to support the alarm specific states.

@dshokouhi
Copy link
Member Author

One more thing: the friendlyState function should be updated to support the alarm specific states.

done :)

Copy link
Member

@jpelgrom jpelgrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, but I'm not able to test this live

@dshokouhi
Copy link
Member Author

Code looks good to me, but I'm not able to test this live

for testing I had 2 panels up. 1 with a code and the other without a code. I could only test using the Manual alarm control panel

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

Successfully merging this pull request may close these issues.

Controls for alarm domain in Android Auto
3 participants