Skip to content

Commit

Permalink
add 'arm vacation' action for alarm_control_panel entities
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsfaber committed Dec 19, 2022
1 parent 40da427 commit 42252e0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/standard-configuration/action_icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const actionIcons: IconList = {
alarm_arm_away: 'mdi:exit-run',
alarm_arm_night: 'mdi:power-sleep',
alarm_arm_custom_bypass: 'mdi:shield-lock-outline',
arm_vacation: 'mdi:shield-airplane',
},
automation: {
turn_on: 'mdi:power',
Expand Down
1 change: 1 addition & 0 deletions src/standard-configuration/action_name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const actionNamesList: Record<string, Record<string, string | actionNameTemplate
alarm_arm_away: 'ui.card.alarm_control_panel.arm_away',
alarm_arm_night: 'ui.card.alarm_control_panel.arm_night',
alarm_arm_custom_bypass: 'ui.card.alarm_control_panel.arm_custom_bypass',
alarm_arm_vacation: 'ui.card.alarm_control_panel.arm_vacation',
},
automation: {
turn_on: 'ui.card.vacuum.actions.turn_on',
Expand Down
3 changes: 3 additions & 0 deletions src/standard-configuration/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export const actionList: Record<string, Record<string, ActionItem>> = {
alarm_arm_custom_bypass: {
supported_feature: 16,
},
alarm_arm_vacation: {
supported_feature: 32,
},
},
automation: {
turn_on: {},
Expand Down
1 change: 1 addition & 0 deletions src/standard-configuration/states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const statesList: Record<string, VariableConfig> = {
if (supported & 1) modes = [...modes, 'armed_home'];
if (supported & 4) modes = [...modes, 'armed_night'];
if (supported & 16) modes = [...modes, 'armed_custom_bypass'];
if (supported & 32) modes = [...modes, 'armed_vacation'];
return { options: modes };
},
},
Expand Down

0 comments on commit 42252e0

Please sign in to comment.