Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Comfort2MQTT with Home Assistant Part 2B - Keypad Custom card
#1
Home Assistant - Custom Card \"#\" button  The native Alarm Control Panel card does not include a # key for Force Arm, so you need to create a separate custom button card that can simulate the # key. One option is to install the Custom Button Card and then call \'arm_bypass\' which is configured to send a # key code instead of arming into Custom bypass mode. The other option is to design your own card that incorporates this key. Below is the easiest option to follow.  T

[color=\"#ff0000\"]EDIT: 10 April 2025- The instructions install HACS V2 replaces the old instructions which required SSH and Terminal. This new method is much easier[/color]

To install HACS. follow the following instructions

Installing HACS version 2 (Home Assistant Community Store)

Click on this link https://tsh.li/HACSLink






Press START












The Custom Button Card has been added via HACS

The procedure below creates a custom button for the # (or Force Arm key). However, it will not appear automatically in the Overview Dashboard. You either have to Take Control of the Overview page, or Create a new Dashboard where you can add items manually. I prefer to add a dashboard and leave the default Overview dashboard alone.

Assuming you have created a new Dashboard (default type),  eg named \"HOME\". Take Control of it so you can manually configure. click in the pencil (EDIT) icon on the top right of the new dashboard, then click on Add Card button on the bottom right.
Which card would you like to add? - Choose Custom-Button from the list of available button types.







Configure the Button Card manually





enter the text below;

type: custom:button-card
name: \'Comfort # Key\'
icon: mdi:pound
color: rgb(28, 128, 199)
size: 10%
tap_action:
  action: call-service
  service: alarm_control_panel.alarm_arm_custom_bypass
  data:
    entity_id: alarm_control_panel.comfort_alarm


Press Save
The Custom button appears in the last spot. Change the position by pressing + or – button so it is below the regular keypad in the grid. It looks ok on PC but in different place in mobile app 



The # key will force arm the security system when zones are open while arming.

Verify Installation.  Restart Home Assistant to apply the changes.Check if the Button Card is now available in your Lovelace dashboard. 


#2
Note that this alarm card is for Local Arming. To Arm to Away Mode, the Entry Door must be opened and closed, or if already Open, it must be closed to indicate that the user has left the property. If this is not done there is an \"ARM FAIL\" Alarm.

This automation in automations.yaml creates a button that Does a Remote Arm to Away, ie does not require the entry too to open and Close, and also does a Force arm if any zones are  open.

- id: \'1234567890\'
  alias: Arm Remote
  description: \'\'
  triggers:
  - trigger: state
    entity_id:
    - input_boolean.test_button
    from: \'off\'
    to: \'on\'
  conditions: []
  actions:
  - action: mqtt.publish
    metadata: {}
    data:
      qos: 0
      topic: comfort2mqtt/alarm/set
      payload: REM_ARM_AWAY
    enabled: true
  - action: mqtt.publish
    metadata: {}
   data:
      topic: comfort2mqtt/alarm/set
      payload: ARM_CUSTOM_BYPASS
    enabled: true
You can remove the 2nd action ARM_CUSTOM_BYPASS if you want the button to only do a Remote Away Arm, but not BYPASS. You could use the CUSTOM BYPASS button already programmed to do the force arm.

In the Dashboard press +ADD CARD on bottom right, choose By Entity, look for Arm Remote in the entities list and Add the Card. This creates a button on the dashboard. 




It appears as an On/off button. DO NOT press the On / Off button.  Click on the arm remote icon - this will open a new window Run Actions. 

   
Tap Run actions to do a Remote Force arm to AWAY mode
#3
If you find that arm to Night Mode is not seen in the Comfort Alarm Card, as below;


Do an extra step. 
You need to Edit the Alarm Card   Press the pencil button on the top right of the Dashboard, go to the Comfort Alarm card and press the EDIT button




In Available States, Night was not enabled. Check the box to enable Night Mode



This will allow the Arm Night button to be shown. You can also enable the Arm vacation button if required. 



#4
For Part 3b go to http://www.comfortforums.com/forum143/5605.html


Forum Jump:


Users browsing this thread: 1 Guest(s)