CoRE - Get peer assistance here with setting up Pistons

Change your trigger (full dot “changes to”) to a condition (empty dot “is”)

See if this solves your problem

Clicking on the image should display all of the Piston

Thanks. Yes I did know that but it wasn’t opening on my phone for some reason.

What happens if you try an OR-IF?
I agree with @c1arkbar, try changing 'changes to@ to ‘is’.

I changed the Piston to use “is” rather than “changes to” and the task still didn’t cancel when I turned the TV on the lights still turned off.

The wait command worked better for me… Using delay, it was behaving erratically.

Can you take another screenshot of what you have right now? I am coming into your issue late but would like to see an updated piston.

@c1arkbar The problem seems to be that the “cancel on condition or piston state change” doesn’t seem to work when the tv gets turned on or motion is detected

Here is what my piston looks like at the moment

Did you try changing it to an OR-IF?

1 Like

Or-If seems to work. Thanks @bobbles. What would be the reason Or-If works and Latching doesn’t?

TBH I don’t know.
All I thought by looking at your piston was that the two sections could actually run independently and did not need to be linked.

@GatVlieg Did you ever get this working? I would like to create a Piston to turn off my shower fan if it is still running after 20 minutes. Was hoping to get an example of working code to make mine work.

Would someone be able to tell me how to properly capture the current state of multiple lights?

I have a pressure mat next to my bed. I’m trying to setup a piston that will dim my two bedroom lights from their current state to 0 over 5 min when it’s stepped on. I’m currently just having them dim from 60% to 0, but often the lights are dimmer than 60%… so the brightness increases just to decrease again. Thanks!!

Something like this… this is for one light only though, so you might have to create additional tasks if you have more than one.

► Save attribute 'level' to variable {curLevel}'
► Wait 2 seconds
► Fade level from curLevel% to targetLevel% in 600s

Looking at your above comment, is it possible to actually set the level without actually turning the dimmer on?

I’ve never really messed with setting the level without turning on the bulb. I’ve seen it asked a few times but I have not gotten around to experimenting.

OK thanks.
Will have to play myself.

Why not remove the variable in the first section? And then in the servings change the variable to “the lights you are turning off are on”

Then the first section turns them on and when all of the conditions are met in the second then it will turn them off.

So it was resolved by changing to or-if piston?

1 Like

Yeah it was indeed. Thanks for your help @c1arkbar

1 Like