Rule machine lights, dim up and down

Hello.

is there a way i can mix this 3 rules in one? i have tried and nothing works... separated they work perfectly.



You're in good hands with @Sebastien, my only contribution was to request you describe in simple terms what you want to achieve... Spelling out the triggers and sequence of actions resulting from those... And any events that should stop those actions...

1 Like

The 2nd and 3rd could easily be merged.

First, the “if fast motion…” part of the condition is not required. It will always be in the required condition since that is the trigger event.

The first (inactive motion) rule could be replaced by a “wait for expression” active motion after the “on:access dimmer:command”. The remaining actions could be added afterwards, all before the end-if.

Also note, there is a missing condition in your first rule - see; “and (f) [False]”

1 Like

The first rule doesn't make sense to me.... Triggering actions at sunrise and sunset.... It feels like the IF condition should be based on the broader condition of sunrise / sunset, rather than the condition of the lights....

This is where the broader description of the desired outcome is useful....

1 Like

hello!

something like this?

image

That should work if your intent is for the first thing to happen is a dim down event - ie it only start if the motion was active on any of the 2 dimmers and becomes inactive between sunset and sunrise when mode is home.

I would typically make the trigger Sensor “Active” and invert the expressions to match.

The best approach in my experience is to test it out, see if it does what you need and if not, share what is happening vs what you would like to happen.

1 Like

so i made changes, tried this, but didnt work at all

im lost

That ELSE seems to be orphaned somewhat?

1 Like

basically i want this two lights to turn on at sunset and off at sunrise.

STAIRS, is a zigbee light that works well with hubitat. the Access switch is a virtual switch to turn on a wifi light on alexa. the access dimmer is a virtual motion or contact switch to dim the wifi light (access switch) when on detected by alexa...

so when there is no motion i want both to be dimmed down, and dimmed up when there is motion...

but cant make them work if merged all together, just separated

the last else?

Yes

Ok, I think I get more of what you are trying to achieve, let me take a closer look at the rule again...


i made a change to turn on first of all the lights and deleted the last else

i think my issue is the first if... it has two motion sensor, and says any inactive.... so if 1 of them has motion which will make it active. that first if will still be true since the second motion sensor is still inactive...

I think you're heading in the right direction.... keep tinkering with it....

A couple of other tips, at least from my own understanding...

Predicates dictate whether the triggers will fire (there's probably other things they impact, but let's stick to that for now).

I believe conditions, e.g. IF conditions, are assessed when the rules fires. This I am only 70-80% sure on, hopefully someone will correct me if I am wrong...

ok so this works now. but i believe that only with the motion. the lights will be ON... so if no one is at home it wont work....

and if we over sleep and wake up late, the lights will still be ON... so maybe i need the add the trigger for sunset and sunrise... and add an IF between times on the actions...

ill have to think it with the pillow now

1 Like

Sweet dreams :grinning_face_with_smiling_eyes:

Sounds like you're getting the hang of this....

It's about getting familiar with how the different components of rules work, when things are processed and then working through the different scenarios that can occur in reality, just like you were doing in your last post.

It takes some time to learn, but is time well spent, it is an incredibly powerful tool. RM, like the HE platform, is constantly evolving, with new features and others re-imagined... I'm in now way a technical expert, but if you can master the logical concepts and the fundamentals of predicates, triggers and conditions, you will be at an advantage.

Anyway, enough of my ramblings... Enough to put someone to sleep :wink:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.