System started is triggered upon openHAB startup, after the rule file containing the System started trigger is modified, or after item(s) related to that rule file are modified in a .items file.
For my understanding I have no items edit related to this rule, therefor the rule should not executed.
Yes but the parser does not know which items are used in which rule(s), so it has to parse them all and this causes the System started trigger to apply.
So we should probably change that sentence in the docs because it clearly implies that if you change a .items file that all the System started Rules will fire.
It wouldn’t be just that one Rule. If you change a .items file containing any Items that are referenced from any Rule in that .rules file the whole .rules file would be parsed and the System started Rule triggered.
Of course, this presupposes that OH is working as described in the docs which Markus indicates is not the case. I’ve honestly never paid attention to this in a very long time. I’ve eliminated the bulk of my System started Rules…
I just ran a quick test and it does appear that all System started Rules get fired for any change to a .items file whether or not the Items appear in the .rules file with the System started Rule. I’ll submit a PR to change that sentence to make the true behavior of OH more clear.
This is weird because I don’t recall this being how it worked, but I’ve noticed lately every time I reload one item file, it seems like all items reload and all system start up rules run. Basically, it’s like the system restarts
Maybe I never noticed it.
That part has always been the case - imagine if you had a Group in one file and added/removed member Items in another, it’s the simple way to sort it out.