Sure, again, just enter it in a Set Variable task (make sure its name starts with @ to make it global) or go to the main CoRE app and add it there in the Global Variables page. Either way will have the same effect. Once the variable created (either by running the piston that sets it, or by manually adding it to the list), the variable will show up in the select lists throughout all the pistons.
I’m still failing at this. I set the automation to trigger if a button is pressed. I assumed I wanted “changed to” rather than “is”.
For the action, I set the variable “entity_id” to string variable “scene.bedtime”. Then make the web request. I see the button press happening in live logging but I don’t see any thing else happening. Here’s the log:
b8ed92b1-86c0-431f-a6ac-0fda8a660fc2 4:58:12 PM: debug Parse returned [name:button, value:pushed, data:[buttonNumber:3], descriptionText:Garage Light Tap-Up-2 (button 3) pressed, isStateChange:true, type:physical, displayed:true, linkText:Garage Light]
b8ed92b1-86c0-431f-a6ac-0fda8a660fc2 4:58:12 PM: debug sceneNumber: 1 keyAttributes: 3
https://goo.gl/photos/LzBiEwvw2ixVRZsp8
I am not able to get action one to work. The load attribute part does not trigger. I noticed that the 20th Dec version should have fixed a bug. Has anybody been able to get this to work, are there any work arounds.
Well after two hours of setup, I’ve got it all setup and working. Thanks again for the help.
Can’t wait! That will make it easier. How about importing and exporting pistons? That would make sharing awesome
Yep. That is planned as well.
You can see what he’s planning and where he’s at in the process here…
Need help with some CoRE logic …
For the first time I am wanting to combine actions based on both a contact sensor and a motion sensor. Here’s my requirement:
- Turn on pantry light if pantry door contact sensor is open.
- Turn off pantry light if pantry door contact sensor is closed.
- Turn off pantry light if no motion detected on the kitchen motion sensor for n minutes AND pantry door is still open.
- Turn pantry light on if motion detected in the kitchen and the pantry door contact sensor is open.
Can someone give me some guidance how to accomplish this in CoRE.
TIA.
In the “THEN” section, trying to set a global variable equal to a local variable. I tried setting my variable to “…or variable value…” and select my local variable. It shows what my local variable is currently set to, but the result is this:
I want to set {@AbodeMode} = {newMode}
How do I do that?
Thanks.
@ady624
I’m looking for simple piston help. I’ve read through these but there are so many variations (which is what I love about this app).
I simply want to turn on a couple of lights when any one of my three presence sensors changes to present.
IF its after sunset AND also IF no other presence sensors are “Present”
Basically 1st person home after sunset will have lights turned on. If someone is already home, then don’t do anything.
You can try:
IF
- Time is between sunset and sunrise
- AND
- Any of presence1, presence2, or presence3 is present
THEN - USING lights (state change only)
-> turn on
Trying to compare a string variable to “is one of” and can’t figure out how to format my compare values. I’ve tried surrounding the values with single quotes, double quotes, and no quotes, and it still won’t work:
Thanks.
@ady624
Thank you. I’ll try that shortly.
You also might need to add “Cancel on piston state change” under Task Cancellation Policy for the BUT IF to restart the timer on the motion if it becomes active again.
Wont that logic turn on the lights if anyone was already home?
also would it turn on lights as each person came home even if someone was already there?
Question - I have created pistons that (Just something to note) work flawlessly.
Are the variables something i have to type in? or do i select them? Im not much of a coder anymore. Its been 15+ years out of the game…
I can handle simple things, as im a simple man…
Thanks for your help.
Sorry I think I got it. So State Change Only in this case would be referring to the state of the presence sensor?
So if any of the sensors State changes to Present between those times turn on the lights?
I’m still having problems grasping. multiple people arriving at different times with this scenario.
So is after sunset, no one is home. 1st person gets home. presence changes to Present, Lights turn on. - Great.
Person comes is turns off the lights but is still home
Person 2 arrives 30 minutes later. Presence changes to present. Do the lights turn on? It is a state change, right?
That is mainly what I’m trying to avoid.
“State Change Only”, in this case, is referring to the state of the piston, i.e., the state of the condition — presence AND time (between sunset and sunrise).
Correct
The state of the piston doesn’t change since someone is already home AND time is between sunset and sunrise. If anyone already home manually turns off the lights, it doesn’t get turned on with the coming and going of the other present sensors.
Ok, last question. I think I got it now. While setting it up I notice there is a setting for is present or changes state to present.
My question is. with the rule you provided. Would the lights turn on after sunset if someone was already home. I think the answer is yes. So would it be better to select changes to present vs is present.
sorry for asking what is probably a simple logic puzzle. haha. I really appreciate the help
EDIT: I guess I keep struggling with what will cause the piston to be triggered. I would think that presence change and time change would trigger the piston. It would then run through the logic to see if the conditions were true.
So sunset hits, the piston kicks off, checks to see if anyone is home. No one home. Go back to paused/not running
Presence sensor changes state. Piston goes off to see if its after sun set, and also to verify that the state of the presence sensor is what it needs to be. If the AND state is met, it does what it is supposed to do.
So in the case of someone being home when it becomes sunset. I would think piston kicks of. “Hey its sunset”, run this rule. Whats the logic. Well after sunset if someone is present, turn on the lights. Well someone is home, so lights ON.
Yes, the lights would turn on.
If you change the “is” (a condition, empty circle) to “changes to” (a trigger, filled circle), with someone already home and it’s sunset, the lights will not turn on since that person’s presence did not change to Present (it was already present). However, when the next person arrives, their presence will CHANGE to Present and the lights will turn on — the state of the piston changes to true. For the next person that arrives, their presence will also CHANGE to Present, however, since the state of the piston is already true, the lights will not turn on even if someone already home manually turns them off.