Problems with "condition temporelle"

Hello everyone,

I’m trying to use a time condition to create a scene that disables my TV’s standby between 00:00 and 06:00 every day.

I’ve simplified it as much as possible because I can’t get the time condition to work.
For now, I want to send myself the value measured by a sensor in a message, but nothing happens.


When I tested, it was during the time window.
Since then, I’ve been looking for answers on the forum and in the documentation, to no avail.

Maybe I’m doing it wrong.

Thanks in advance for your help.

You’re missing a Trigger (you can set a Scheduled Trigger)

It says that the trigger is optional.
I tested with a trigger:
If I set a trigger at a certain time and the 2nd condition (luminosity < threshold) is not met because the light is still on, the scene will not be triggered after that time.

I could set a trigger at intervals every 10 minutes, but that overloads Gladys’ operation.
Adding a time condition to check that the time window has been reached isn’t ideal.
Not using a trigger seems more sensible to me.

I’ve tried, but I can’t exactly understand the scenario you’re after…
Basically: if between 00:00 and 06:00 the brightness is < XX then we cut the TV’s power? Am I right?

For me the only way to do that is to create a trigger every x minutes/hours. I’m not sure that will overload Gladys, although I agree with you, it could be more efficient!

It should be possible to both schedule a trigger at a programmed time AND set the interval so it only checks within that interval :wink:

Yes, that’s it for the scenario.

So I don’t see what the option to not set a trigger is for.

So I don’t see what the time condition is for, or how it works.
https://gladysassistant.com/fr/docs/scenes/time-condition/

Good evening,
Without being an expert or sure, scenes that can be called by other scenes don’t need a trigger in that case.

Otherwise, in addition to @guim31, indeed set a trigger at regular intervals, then as the first action put your time condition

Ok for that:

It would probably be good to mention that, because in my case I didn’t see the need for a trigger.

About that:

I just tested a trigger every 2 minutes that checks whether we’re within the desired time range. (You need a time range large enough to be sure to fall into it, or an interval small enough…)
It then executes the action.

I thought that the time condition itself would check whether we were inside the time range, but that’s not the case.
So you need an interval trigger that checks if we’re within the time range and thus executes the action each time it is triggered within that range.

2 Likes

Another option: you keep your time condition and act on the plug when the electrical current consumption falls below a threshold.

I’m at the reception limit for over-the-air signals with TNT (DTT - Digital Terrestrial Television).
So I installed LibreELEC on a Raspberry Pi 400 with an Orange TV extension.

A smart plug for the Pi, another on the TV.

  • When people turn on the Pi, the current (amperes) increases and triggers
    the TV to turn on.

  • When they turn off the Pi, conversely the TV plug turns off.


So for you to turn off
trigger: change of state of the plug
plug below 0.01 A
time condition between 00:00 and 05:59
→ turn off the plug

Turn on the TV
trigger: scheduled
at 6:00 turn on the TV plug

Note: I just had to modify the plug parameters in Zigbee2MQTT
because it only sent values every 7 minutes minimum; for starting the TV that wasn’t practical.

1 Like