Trigger only once

I’m sure this is a basic feature in RM and has been covered in these forums, but I have so far been unable to locate my answer.

I have migrated from ST where I was using webcore for my automations. I am a RM novice and to be honest find it very difficult to use compared to webcore.

I have a RM rule that triggers a scene when lux falls below a certain level.

I use this rule to turn on various living room lights when it gets dark.

But....I only want it to trigger once (I.e., when the room first gets dark at dusk). This was easy with webcore, but can’t work out how to do it in RM.

This is problematic for me because if I turn off, or dim any of the individual lights in the room once the rule has first triggered, the scene re-activates pretty much immediately (presumably when my light sensor reports a new lux level, thus triggering the scene to turn on again).

The trigger has to be lux (rather than +/- sunset).

Any pointers would be appreciated!

When you say "once", once in what timeframe?

As light levels fall in my room in the evening the lux will fall below 50, this is the one time I want the rule to trigger (not every time my sensor reports a level below 50)

In webcore the trigger was ‘when lux falls below 50’’...which (unless a grey cloud passes over!) will happen only once per day.

There is more than one way to doit.
You can create a General Variable (OAD as bool) and set it to 0 in the morning
or when lux go over 200 for example
Then :
If Lux < 50 and OAD is 0 then
switch on bulb
set OAD to 1
end if

1 Like

so not again until it goes over 50? right?

Yeah, what @roberto.grosso.rgr said is right. You're going to need a variable that is set to record that it happened, and a second rule that resets that variable the next day. You could use Private Boolean to do it. It starts out true, so you'd set it to false when the rule is triggered, and then after that exit the rule if its false.

1 Like

Yes, I did think a variable would be one way of doing it...but assumed there must be a simpler way...I can certainly give that a go!

Thank you both for the quick direction!

Then you need a second rule that runs once a day to set Private Boolean for that rule to true.

EXIT RULE?
For a moment a saw me little and scared at scool in front of a 286 PC programming in BASIC
whit my prof that is telling me that using EXIT FOR is a bad way to program...
It was long time ago :slight_smile:

You are still scarred from that experience.

1 Like

I remember it after years :sweat:
Anyway my prof was wrong :slight_smile:

1 Like