This is a Lovelace card for Home Assistant that can be used to control your Alarmo security system.
The card works on top of the alarmo custom component. You will need it this as well.
This card is only suitable for controlling entities (of type alarm_control_panel
) which are generated by the Alarmo integration, you cannot use it with any other alarm integration in HA.
Preview:
The alarmo-card is similar to the Lovelace alarm panel card, but brings some extra functions:
- A countdown timer is displayed when the alarm is in arming or pending state. It shows you how much time you have left for leaving the house / disarming the alarm.
- A message is displayed when the arming of the alarm failed or the alarm has triggered, with an overview of the sensor(s) involved.
- The card gives you feedback when a wrong code was entered.
- You can resize the buttons
click to show installation instructions
HACS installation:
Note: Ensure you have a www folder created as in config/www or the installation will succeed but fails silently
- Click the Orange + button bottom right and search for Alarmo Card
- Click on "Install" under the new card that just popped up.
Note: Ensure to install https://github.com/nielsfaber/alarmo
and add the integration in order for the card to work properly.
Manual installation
-
Download the latest release of
alarmo-card.js
here and place it intowww/alarmo-card
. -
Use the GUI; Configuration -> Lovelace Dashboards -> Resources Tab to add
/local/alarmo-card/alarmo-card.js?v=0
, or add a reference to the card in the resources section ofconfiguration.yaml
:
resources:
- url: /local/alarmo-card/alarmo-card.js?v=0
type: module
click to show updating instructions
Updating via HACS: HACS should auto-remind you in the HACS tab when an update is available.
Updating manually:
Use git pull
for manual installation updates.
Since most browsers will cache the Lovelace card code, you can force a refresh of the browser by editing the entry in the resources:
section in ui-lovelace.yaml
, by updating the version to ?v=(n+1)
(where n
the current value).
For setting up the card, you need to assign the correct entity to the card. All settings regarding delay times, arming modes, code settings are automatically detected.
Example YAML configuration:
type: 'custom:alarmo-card'
entity: alarm_control_panel.alarmo
Configuration using UI mode:
- Go to the Lovelace page where you want to add the card
- Click "Edit Dashboard" on the right (under the button with the 3 dots)
- Click the "Add card" button on the bottom
- Choose "Custom: Alarmo Card" and pick the correct entity.
Name | Type | Requirement | Description | Default |
---|---|---|---|---|
type | string | Required | custom:alarmo-card |
|
entity | string | Required | Alarm_control_panel entity | |
name | string | Optional | Displayed name (next to icon) | (Take from entity) |
keep_keypad_visible | boolean | Optional | Keep the keypad always visible, also when no code input is required. Only useful if numerical code is used. |
false |
button_scale | number | Optional | Scaling factor to apply to the size of the buttons in the card (between 1.0 and 2.5) | 1.0 |
use_clear_icon | boolean | Optional | Show icon (instead of text) in keypad for clearing code input. Only useful if numerical code is used. |
false |
show_messages | boolean | Optional | Show diagnostic messages in the card when alarm is triggered or cannot be armed. | true |
states | object | Optional | Customize the display of states in the card. See state configuration. |
State configuration allows users to modify the displayed texts and buttons (where applicable) in the card corresponding to certain states.
Note that the alarm entity may not support all armed_xxx
states. States which are not supported will not show up in the card and cannot be configured.
Name | Type | Applicable states | Description | Default |
---|---|---|---|---|
hide | boolean | armed_away armed_home armed_night armed_vacation armed_custom_bypass |
Hides the button corresponding to the state. | false |
button_label | string | disarmed armed_away armed_home armed_night armed_vacation armed_custom_bypass |
Overwrites the text on the button. Only useful if the button is not hidden. |
(Use translation from HA) |
state_label | string | disarmed triggered arming pending armed_away armed_home armed_night armed_vacation armed_custom_bypass |
Overwrites the text displayed in the card when the alarm is in this state. | (Use translation from HA) |
Example of using state configuration
The example below hides the armed_home
button (although the alarm supports it), and renames the armed_away
/ disarmed
options.
type: custom:alarmo-card
entity: alarm_control_panel.alarmo
states:
armed_away:
hide: false
button_label: "Turn on"
state_label: "Enabled"
armed_home:
hide: true
disarmed:
hide: false
button_label: "Turn off"
state_label: "Disabled"
# ... rest of card config
Result:
If you want to make donation as appreciation of my work, you can do so via PayPal or buy me a coffee. Thank you!