I have a momentary zwave switch connected to garage door and a zwave contact sensor on the door
Contact sensor open when garage open and closed when the door closed
Im trying to set a virtual dimmer in EG to 60 when the garage closes and to 65 when the garage opens
when I open the garage door it sets the virtual dimmer to 60 when it should set it to 65
I have attached both pistons
Garage door and EventGhost
Is switch 16 your momentary contact switch? If so, when it turns on, the contact sensor won’t have changed yet so it would always report the wrong value.
Right now everything you have is conditions so they have all become triggers. Your contact sensor changing to open/closed should be your trigger and you should combine these pistons into one something like this:
if contact sensor changes <-- trigger
then
if contact sensor is open. <--condition
set level to 60%
else
set level to 65%
end if
end if
I’m not sure if you need the switch but you can add that to the logic if needed.
See this thread for explanation of triggers and conditions:
Thanks works great now. I kept them seperate just easier for me to add the send push notification
Having trouble with this piston as well its suppose to close the garage door at sunset and close if its open for 10 min. Closeing the door if its open for 10 min after sunset works ok but no matter how I word it the garage door will not close at sunset. Is it because I have two triggers
@trickyrick I think you just need to change your ‘and’ to ‘or’ for the two triggers.
Next time post separate questions in separate threads. That will make it more obvious and get quicker response.
If I change it to “or” doesent that mean the piston can run at anytime the contact is open for 10 min. I just want that to run after sunset
Thanks
That is correct, you need to add the condition of after sunset but I would come up with a more speciic time frame, only between sunset and sunrise for example. (And I usually code this as time is not between sunrise and sunset, sometimes webcoce gets confused when you cross midnight with a time frame).
IF Time happens daily at 5 min to Sunset (Trigger 1)
OR
IF contact sensor stays open for 10 minutes AND time is NOT between sunrise and sunset (Trigger 2)
Yes, I misunderstood. I thought you wanted it to close after 10 minutes any time of the day. @fieldsjm solution should do the trick. just make sure the second trigger is a group. It should look like this:
IF
Time happens daily at 5 min to Sunset
OR
{
contact sensor stays open for 10 minutes
AND
time is NOT between sunrise and sunset
}
then
Thanks, guys I’ve made the changes and we will see if it works tonight. I didn’t even know I could change and to or. Learn something every time.
When you have a group does it make a difference if the condition goes before the trigger or does the trigger always have to come first
Have a good day
Rick
It is best practice to list the trigger as I have seen it cause issues in pistons but I don’t know the technicial details behind why it would make a difference.