This object is in archive! 
Need help with two rules
Need Answer
Hi!
I need help creating two rules.
The first is for a switch.
I want it to run a scene turning ON all the lights in the apartment if ALL lights are OFF or turn OFF all the lights in the apartment if there is one or more lights ON. I've tried making a rule with a variable sensing if the switch is off or on, but because it's a bipole switch that only works have of the time. If there's some lights on, it turnes them off, but sometimes it just runs the scene and then I have to flip the switch again to turn off all the lights.
The second rule is a simple coffee machine timer. I have a switch that I want to switch off 2 hours after I switched it on.
I've attached the current rule.
Files:
Skärmklipp 2015...
No connection
Real-time notifications may not work
01)
How many light do to you have?
For each ligt make this rule:
When Light x = Any
If Light x = On
Set var Light > 1
Else
Set var Light > 0
Light y
....
When virtual switch x = On And Var Light = 1
Scene x = Off
Else
Scene x = On
Maybe you could combine it into 1 rule.
02)
WAIT xx
Coffee Switch=OFF
But it's better to make it like this (check if you turn it on again):
When Coffee Switch=ON And NOT Var Coffee =1
WAIT xx
Refresh ALL
IF VAR Coffee =1
Coffee Switch > OFF
SET VAR Coffee > 2
SET VAR Coffee > 2
WAIT xx
Refresh ALL
IF VAR Coffee =2
Coffee Switch > OFF
SET VAR Coffee > 2
This way the coffee machine is never turn off if you turn it on again.
01)
How many light do to you have?
For each ligt make this rule:
When Light x = Any
If Light x = On
Set var Light > 1
Else
Set var Light > 0
Light y
....
When virtual switch x = On And Var Light = 1
Scene x = Off
Else
Scene x = On
Maybe you could combine it into 1 rule.
02)
WAIT xx
Coffee Switch=OFF
But it's better to make it like this (check if you turn it on again):
When Coffee Switch=ON And NOT Var Coffee =1
WAIT xx
Refresh ALL
IF VAR Coffee =1
Coffee Switch > OFF
SET VAR Coffee > 2
SET VAR Coffee > 2
WAIT xx
Refresh ALL
IF VAR Coffee =2
Coffee Switch > OFF
SET VAR Coffee > 2
This way the coffee machine is never turn off if you turn it on again.
Here is a little introduction on the rule created to get you started:
http://wiki.zipato.com/wiki/Overview_(Rules_Creator)
Here is a little introduction on the rule created to get you started:
http://wiki.zipato.com/wiki/Overview_(Rules_Creator)
Replies have been locked on this page!