Rule with system startlevel 100 trigger runs at startlevel 40?

I have written a rule that and added a trigger that should trigger the rule execution when the system Startlevel reaches 100.

However, when I save this rule, the rule is executed too. Adding some logging to the rule shows me the rule is started when the Startlevel ‘40’ has been reached. Is this normal behavior? I would think the rule wouldn’t execute on this Startlevel?

Excerpt of the yaml for the tirggers

triggers:
  - id: "1"
    configuration:
      itemName: Amplifier_Power
    type: core.ItemStateChangeTrigger
  - id: "2"
    configuration:
      thingUID: samsungtv:tv:09896801-00a0-1000-bf66-84a4665078df
    type: core.ThingStatusChangeTrigger
  - id: "3"
    configuration:
      startlevel: 100
    type: core.SystemStartlevelTrigger

Hi @jarnob

with a trigger of StartLevel 100 the rule will trigger when the StartLevel reaches 100 as well as when the other conditions were being satisfied (in this case probably because the values are being updated by persistence) , if you only want this to execute if the system StartLevel was 100 you need that as a Condition rather than a trigger (in the UI its the section But Only if)

Thanks Brett! Good to know!

I want to elaborate just a little on @BrettLHolmes’s answer.

Triggers to a rule are always or’ed. In this case, in prose, the triggers would read:

when Amplifier_Power changed or the samsungtv:… channel published an event or the start level is 100.

Triggers are events.

Conditions, on-the-other-hand, are and’ed. All the conditions must be true before the rule will run. Conditions check for state.

2 Likes