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

feat(chips): add alarm control panel chip #131

Merged
merged 2 commits into from
Feb 17, 2022
Merged

Conversation

bemble
Copy link
Collaborator

@bemble bemble commented Feb 17, 2022

chip-alarm-control-panel-lightchip-alarm-control-panel-dark
Add alarm control panel that displays icon and color like the card.

Also added chip name translation, if PR is validated, we have to update translations in #130

fix #105

@bemble bemble requested a review from piitaya February 17, 2022 15:35
Copy link
Owner

@piitaya piitaya left a comment

Choose a reason for hiding this comment

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

Very cool ! 👍
Thanks for the translations and the improvements !

src/utils/lovelace/element-editor.ts Outdated Show resolved Hide resolved
src/cards/chips-card/chips/alarm-control-panel-chip.ts Outdated Show resolved Hide resolved
Also remove old log and enable color even for not active alarm panel (ie disarmed).
@piitaya
Copy link
Owner

piitaya commented Feb 17, 2022

For the translation, if the key is not present in the file, it will fallback to english so it's not a problem 🙂

@@ -92,7 +92,7 @@ alarm_control_panel:
- alarm_control_panel.alarm_panel_1
- alarm_control_panel.alarm_panel_2
disarm:
service: alarm_control_panel.alarm_arm_home
service: alarm_control_panel.alarm_disarm
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@piitaya piitaya added the enhancement New feature or request label Feb 17, 2022
@@ -105,7 +105,7 @@ export class ChipsCardEditorChips extends LitElement {
${CHIP_LIST.map(
(chip) => html`
<paper-item data-type="${chip}" }

Choose a reason for hiding this comment

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

I would recommend moving away from Paper Drop down menus. I know this was not changed in this PR but something to think about.

HA frontend is moving out all paper Drop downs and that means the component will no longer be loaded. We have moved to mwc-select

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for pointing that, I'll create a tech issue.

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

Successfully merging this pull request may close these issues.

Alarm chip icon color not honored
3 participants