Using presence in scenes

Feature description
Presence cannot be used as a trigger or « continue only if ».

It is therefore not possible to create scenes in « lockdown » or « home lockdown in case of absence » mode.
Typically, I cannot use it as an alarm system with Gladys at the moment.

The ideal would be to modify the value of the device linked to the presence of a user (binary, either 0 or 1). This way, actions can be triggered if one or more users are absent.

We could also have a detection of the type « no one is at home ».

I am working on 4 new triggers:

  • When the house is empty
  • When the house is no longer empty
  • When user XX returns home
  • When user XX leaves home

First visual:

Second visual, « the house is no longer empty »:

For the first trigger:
the sentence:
« This trigger will launch the scene as soon as a user leaves the Appartement and they are the last to leave. »

To avoid repetition

For the second:
the sentence:
« This trigger will launch the scene as soon as a user enters the Appartement and they are the first (to enter). »

Instead of « la maison », can we use the name of the house given during creation?
Example: Appartement

Good point, I changed it to:

  • « This trigger will launch the scene as soon as a user leaves the house and is the last one to leave. »
  • « This trigger will launch the scene as soon as a user enters the house and it was empty before their return. »

You select the house concerned in the form.

The PR is available here for these 2 first triggers:

https://github.com/GladysAssistant/Gladys/pull/1153

Yes, I had understood, but in the explanatory sentence?

I don’t see the point in updating the sentence, it will make the sentences strange rather than anything else. « maison » in the sentence refers to the concept of a house, nothing more.

I’m making progress on the other 2 triggers:

Leaving the house

Returning home

The PR is available here:

https://github.com/GladysAssistant/Gladys/pull/1154

Small question, I have a dev instance put on hold because I made a small modification in the chat box view, to get what you did Pierre, do I do a git pull? And will I lose my file modifications?

Thanks in advance for your answer.

Hello,

If the PR changes do not affect any of the files you modified locally, then a simple git pull should work.
If that’s not the case or if you’re not sure, it’s better to commit your local changes, even if you have to merge them later.

You can also use git stash to set aside your local changes while you pull (tutorial/doc: Git stash - Enregistrer les changements | Tutoriel Git d’Atlassian), but it’s a bit more advanced and certainly riskier without sufficient mastery of the tool.

If you need more details, don’t hesitate :slight_smile:

Hello! Just to know, do you only develop the triggering part or do you also handle the continuation only if?

These are just triggers in these developments!

Triggers are available in 4.3:

This topic can be locked to release the votes :slight_smile:

@lmilcent I wonder if we wouldn’t want a « condition » version of these triggers to create scenes « If motion AND the house is empty, then »

Yes, I quite agree, in fact I think it’s the same for all triggers.
The temporal condition you added in the actions follows this reasoning, after all.
We have it in the triggers (scheduled triggering) and now in the actions (temporal condition).
It would also be very practical to do the same for sunset/sunrise (an internal variable in Gladys that would keep this in mind thanks to the weather module?).
In my use case, I’m always forced to keep my fake variables to have this condition, quite simply:

  • Trigger: if access badge presented at the barrier:
  • Action 1: Open barrier,
  • And: If fake Sunset,
  • Action 2: Turn on the barrier and exterior lights.

Sorry for the second part off-topic, just to emphasize that very often the triggers are interesting in the subsequent conditions.

Yes, the sun in the conditions is a development that has already been decided, there is a functional specification written in another topic :slight_smile:

Hop hop, I just finished developing 2 new boxes « if the house is empty », and « if the house is not empty », which are 2 conditions in the actions:


It’s on master, the dev build has been sent and it will be in the next Gladys release! :slight_smile:

Top!
Can’t wait to use it! :star_struck: