philip1986 / pimatic-led-light

A template for creating plugins
http://pimatic.org/
GNU General Public License v2.0
7 stars 13 forks source link

Sync switches by rule #51

Closed benbeton closed 8 years ago

benbeton commented 8 years ago

Hi,

I'm trying to turn off zone 1 - 4 when Zone 0 (all lights) is turned off. So I created a rule: "if state of milightzone0.power is off then turn off milightzone1 and turn off..."

but this can't be saved, seems that the if condition did not work, any idea how to achieve this?

mwittig commented 8 years ago

Seems like you are mixing up the expression syntax for "variable comparison" and "attribute of a device" predicates. For your case the following should work: if "$milightzone0.power" is "true" then ...

Note, for some reason "on" does not work as it should. For this reason I have been using "true" which works as expected.