Pleg is Great, Please check my logic

Love this plugin, I don’t think I’d be happy with Vera without it. I only used it for 2 days when I decided to license it. You should raise your price, I would have gladly paid double in a heartbeat and even would have paid 19.95 after a week of use. IT really adds that much functionality.

If the Pleg experts could check my coding and logic, it would be much appreciated. Just because it works doesn’t mean it’s the best way to do it. I’m not a coder so any suggestions to make this simple automation better would help, especially as I get bolder and more complicated with my automation down the road.

Goal: Control 4 Hue bulbs in the kitchen with a motion sensor. Between 6:30 and 10:30 have them all come on bright and turn off 1:30 minutes after no motion. Between 10:30 and 6:30 have only two bulbs come on very dim and turn off 1:30 minutes after no motion.

I’m using Fibaro sensor that reports false after 30 seconds of no motion. I also did not want motion sensor to change the light settings if they had been turned on to a different setting manually, but even then still wanted to be turned off automatically.

Logic report for just these items attached.

Glad you like the plugin!

The strategy I use to detect automatic vs manual dimmer settings is that I automatically set
the dimmer values to something that ends in a 1:
11, 21, … 91
If you manually set them they will not end in a 1.

Then I have input properties for the dimmer values.

Auto1Settings: (Dimmer1 % 10 == 1)
Manual1Settings !Auto1Settings

[quote=“RichardTSchaefer, post:2, topic:194951”]Glad you like the plugin!

The strategy I use to detect automatic vs manual dimmer settings is that I automatically set
the dimmer values to something that ends in a 1:
11, 21, … 91
If you manually set them they will not end in a 1.

Then I have input properties for the dimmer values.

Auto1Settings: (Dimmer1 % 10 == 1)
Manual1Settings !Auto1Settings[/quote]

thanks I’ll have to play with that. Current coding was 4th go at it. Using a self-resetting timer solved the issues I was having the other ways I was trying to solve it.