In this guide, I’m going to show you how to arm or disarm you Home Assistant alarm system on a schedule, directly from Lovelace. This is great, because if you ever want to change the time it arms or disarms, you don’t have to edit your Automations. This also means you don’t have to manually arm or disarm it each night.

To do this, we are using date/time helpers.

For reference, I am using Alarmo but this works for the builtin Home Assistant alarm system as well. I’ve already created a few Alarmo guides if you’d like to reference those.


Step 1: Create 2 Helpers

To set the time our Home Assistant alarm system will be armed or disarmed, we will using Helpers. This lets us set the time from a Lovelace card, which then triggers an automation to either arm or disarm at the time we set in the helper.

Go to Configuration > Helpers. Click Add Helper.

Choose Date and/or time.

Give it a name like Disable Alarmo Helper and choose Time only.

Create a second helper, this time called Enable Alarmo Helper and choose Time only.

Now, in your Helpers list you should see two new helpers. Note the entity ID for these so we can reference them in the automations.

Step 2: Add helpers to Lovelace

Next, create a simple Entites Card to Lovelace and add both helpers.

Step 3: Create Disable Alarm from Helper Automation

Give this automation a name like Disable Alarm from Helper.

Triggers:

  • Trigger Type: Time
  • At time: input_datetime.disable_alarmo_helper

Actions:

  • Action Type: call-service
  • Service: alarmo.disarm
  • entity ID: alarm_control_panel.alarmo
  • Code: 123456

Or, simply copy and paste this yaml.

alias: Disable Alarm from Helper
description: ''
trigger:
  - platform: time
    at: input_datetime.disable_alarmo_helper
condition: []
action:
  - service: alarmo.disarm
    data:
      entity_id: alarm_control_panel.alarmo
      code: '123456'
mode: single

Step 4: Create Enable Alarm from Helper Automation

Give this automation a name like Enable Alarm from Helper.

Triggers:

  • Trigger Type: Time
  • At time: input_datetime.disable_alarmo_helper

Actions:

  • Action Type: call-service
  • Service: alarmo.arm
  • entity ID: alarm_control_panel.alarmo
  • Code: 123456

Or, simply copy and paste this yaml.

alias: Enable Alarmo from Helper
description: ''
trigger:
  - platform: time
    at: input_datetime.enable_alarmo_helper
condition: []
action:
  - service: alarmo.arm
    data:
      entity_id: alarm_control_panel.alarmo
      code: '123456'
      force: true
mode: single

Step 5: Test the automation

First, set your alarm to disarmed. Then navigate back to the Lovelace view where you added your helpers.

Look at your clock to determine the time. Set the Enable Helper time to 1 minute ahead of the time it is now, and the Disable helper to 2 minutes head.

Now, just look at your Alarmo Card and wait 2 minutes; you should see the alarmo toggle itself on and off automatically!


Wrapping Up

Overall, this is a simple way to set the alarm without having to edit the time in the Automation each time or manually setting the alarm each night. My wife works the night shift, so I’ve taken the disable automation a step further and added a condition that disables the automation only on the nights she works. That way, the alarm doesn’t get triggered at 4am or something when she comes home.


My Favorite Home Assistant Devices

Below are some of the Home Assistant-compatible devices I personally use in my home. I highly recommend each of them.

The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *