I have several ML apps that use the same flag and they are mostly working fine but occasionally have the same issue. My best guess is that ML misses the transition from on to off sometimes.
Hmmm... I have a few theories.... but can't be sure... I am feeling like you should break up the rule into one for the Porch and one for the Kitchen.... and remove the conditions on the "dull" switches.... but I'll need to think about it and describe it a bit better than that...
One theory would be that the "dull" switch is not updating when it should. I would suggest checking the Events for the switch to see when it moved from on to off to on, etc. You can see this by opening the Devices page, clicking on the switch and clicking the Event button at the top of the page.
I have been meaning to get back to utilising my exterior Hue motion sensors for illuminance detection, so am slightly more interested than normal in how best to construct a rule such as this. Problem for me is I am East/West facing, so the Sun comes up and goes down at either end of the house, so I need to factor that into the equations....
You're right, that does look ok, if not a little odd down here But definitely quite consistent....
I get where you were heading, and I would probably have attempted something similar, though perhaps in a different way, but ultimately the outcome for you should produce a consistent motion lighting outcome... time to move on to the ML setup....
Your comment about other ML apps using the same switch intrigues me... in the sense that I wonder if there is something wrong with the instance of ML app itself. Try opening and saving the ML app that is affected and see if that fixes the issue.
Unfortunately not something quick to test I imagine....
Perhaps a silly question, but is the "OtherDullFlag" device a Virtual Switch (using the built-in VS driver), or a physical switch(ed device) of some kind using some other, notably a custom, driver?
Reason I ask is that I have tried using, say, a Hue bulb as a trigger or condition in test rules only to find that this device sometimes fails to report (or greatly delays reporting) its "Off" or "On" states, even if I use the "On" and "Off" paddles from its own Edit page. Same goes for a Fibaro RGBW controller elsewhere in my home; it can appear "On" according to "Current State" yet be totally "Off" IRL.
Figured I'd throw that concept into the mix, just in case. (If I'm way off-base, I'll come remove this comment.)
Ha, my own commentary got me to thinking... how much more practical a (Boolean) Hub Variable might be for general use as a "switch" in these circumstances.
Of course, that adds an administrative layer of correctly setting TRUE or FALSE, none of which helps if all you're after is, "Just don't turn on the damn lights when this other light switch is down!"
I want to get to that point as well, if the lights are on, don't activate the motion lighting, but need to still work out what the settings interpret as "on".... More my problem than anything else... I'm sure the features are all there...
Hmmm... My inclination initially is to check each of those to find out where they update the switch and see if one of those could be affecting it's setting. I am thinking, I expect like you, that this not likely to produce a useful outcome... but worth ruling out, if nothing else... Other than that... I may need to leave you in the capable hands of those up North...
I think the comment on log entries was regarding the Motion Lighting instance. Unfortunately, those are the logs that will be the most helpful for the OP.
Enabling logging on the virtual switch won't give you any more insight about its state. That is already apparent from the "Events" tab screenshot above, and that is an authoritative source. If or how this gets spit out to Logs is just convention that most drivers should do if descriptionText logging is enabled, but it would basically be the same.
Something else the OP might try: doing this setup in Room Lighting instead. If there a bug in Motion Lighting, it won't fix that, of course, more of a workaround, but Room Lighting can do everything Motion Lighting can, and unlike Motion Lighting, it is receiving active development (including a couple changes in the next platform release). You can import any current Motion Lighting instance into Room Lighting, so you don't actually need to re-create it, though either way works.