Alarm: add a „Night“ arming mode

The need

A home alarm is rarely set to all or nothing. You protect your home differently depending on whether you are away, present during the day, or sleeping. This is the trio that most market control panels offer, and it is also what HomeKit expects: Presence, Night, Absence.

Gladys only offers two: armed and partially armed. As a result, those who want a night mode repurpose the partial mode for this — and end up without a presence mode. And since Gladys doesn’t have a night mode, the HomeKit integration doesn’t expose it either: in the Home app, the „Night“ button is missing.

What is expected

  • A third arming mode, selectable from the widget, a scene, the API, and the Home app.
  • Scenes can request this mode and check if it is active.
  • The current mode remains viewable wherever the current mode is already viewable.

What it would look like

┌────────────────────────────────────────┐
│  Alarm — Home                         │
│                                        │
│  ● Disarmed                            │
│                                        │
│  ┌──────────┐ ┌────────┐ ┌───────────┐ │
│  │ Presence │ │  Night  │ │  Absence  │ │
│  └──────────┘ └────────┘ └───────────┘ │
│                                        │
│  ┌────────────────────────────────────┐│
│  │             Disarm                 ││
│  └────────────────────────────────────┘│
└────────────────────────────────────────┘

Once armed, the widget would display „● Armed — Night“.

Questions to decide

  1. Add or rename? Either we add a mode next to „armed“ and „partially armed“, or we adopt the standard vocabulary Presence / Night / Absence. Renaming is much clearer, but it affects everyone’s existing scenes. Should there be an automatic switch (partial → presence)?
  2. How many modes in total in the end? Three fixed, or should we plan for custom modes (vacation, work…)?
  3. Does the Panic mode remain an arming mode, or does it become a separate action? Today it occupies a slot in the same list, which is debatable.
  4. Should the delay before arming be different depending on the mode? Switching to night mode from your bed doesn’t require the same 30 seconds as leaving the house.

Complexity and dependencies

Low to medium. This is the fastest deliverable request in the batch, and it doesn’t depend on any other.

However, be careful: as long as Gladys doesn’t know which sensors to monitor, a mode is just a label that your scenes interpret. The night mode therefore immediately brings the HomeKit button and a third state for your scenes — but it will make full sense with the request about sensors.

Related requests: the night mode makes full sense with the sensors active by mode, and it is expected by the physical keyboards, which usually have a dedicated button.


This request is part of a set from the discussion Gladys Alarm System (need F02).

I don’t understand the difference between night mode and partial mode?
Can you tell me more please? :slight_smile:

Often the Night mode is seen as a mode where you activate all sensors except where you sleep (for example all sensors on the ground floor).

The Home mode is rather used when you are at home, but you want to lock all external accesses (if someone enters or if your children leave).

The idea would be to replace the current Partial mode

It seems the same to me like this.
My current night mode is sensor present, detection in the house ignored.
Door opening, exterior camera detection, sound activated.

I tell myself that whether I’m at home taking a nap or if I’m sleeping, it will be more or less the same things that will be activated :thinking:

I must be tired, I’ll focus on it tomorrow because I still don’t see the difference XD

On the rest, however, I like the idea :slight_smile:

In my opinion, a night mode monitors doors and windows.

A partial mode allows me, for example, to lock the house but not the office, the adjoining waiting room, and the access door.

Some mockups



I totally get it :flexed_biceps:

I love it! :+1:

A test image is available on cicoub13/gladys:alarm-night-mode

:warning: A data migration is applied, so DO NOT use this image on your production base at all!!!

PR with these assumptions

  1. Add or Rename? Either we add a mode alongside „armed“ and „partially armed“, or we adopt the standard vocabulary Presence / Night / Absence. Renaming is much clearer, but it affects everyone’s existing scenes. Should there be an automatic switch (partial → presence)?

Rename Partial to Presence with migration

  1. How many modes in total in the end? Three fixed ones, or should we plan for custom modes (vacation, work…)?

3 fixed modes (simpler)

  1. Does the Panic mode remain an arming mode, or does it become a separate action? Today it occupies a slot in the same list, which is debatable.

Becomes an action that triggers ALARM_TRIGGERED (but available in the widget)

  1. Should the delay before arming be different depending on the mode? Going into night mode from bed doesn’t require the same 30 seconds as leaving the house.

Same delay for all modes (simpler for now)

Hi, the needs are quite variable depending on the use. Personally, I haven’t put any presence detectors in my armed mode, mainly because of the animals. The partial mode is not useful for me at the moment because I haven’t found any use for it.. and I don’t set the alarm at night (children coming and going, ..).

An idea like that, several customizable modes to choose from in a dropdown menu that would allow you to define different security perimeters in which you can place the sensors you want.

The coverage of an alarm is quite personal and adapted on a case-by-case basis, moreover the way of life changes over time, Gladys has this strength and adaptability to manage all that.

Nb: displaying a countdown is rather nice.

I invite you to read this message Système d'alarme Gladys - #7 par cicoub13 which summarizes all possible changes to the alarm.

And feel free to complete this topic Alarme : déclarer les capteurs surveillés et choisir lesquels sont actifs dans chaque mode which, I think, answers your request.