I’m very new to this and did some researching on this today but I can’t seem to find a working way to do this.
I’ve created a scene (#3) that switches all the audio/video appliances in my living room on. But I want it to check if it is night, and then turn on a light behind my couch as well.
I’ve installed PLEG, armed it, installed day or night plugin, and added 2 triggers to pleg. “livingroom_on_trigger”, which should run when scene number 3 is activated, and “night” which is true when the Day or Night-plugin says it is night now. But in the log-list for the PLEG-device only “night” shows as true, and the scene trigger never is true, so the light won’t turn on.
I’ve also tried adding this to the scene manually with Luup, that worked already (turns out I was using wrong device id’s in the beginning). But I still want to know if I can make use of a scene as a trigger for PLEG-commands.
Creating this with a virtual switch and PLEG worked! Thanks for your help!
But I’ve got one extra question about virtual switches:
I’ve got a Master Switch for my living room. which turns three lights on and off, but there is some PLEG-scripts involved for deciding if it is night or day.
But if I turn on one or two lights manually, it would be nice to still be able to switch the Master Switch off again (it wasn’t turned on in this case, but the off button is always visible), to shut off all the lights in the living room. But if the state of the master switch doesn’t change, it seems PLEG doesn’t do anything. In one way that is ofcourse suspected behaviour, because I’m changing the switch from “off” to “off”, but isn’t their an option for me to add this functionality?
It’s hard for me to understand your requirements. Please send a Status report … then describe your problem in terms of the actual triggers and conditions.
Best Home Automation shopping experience. Shop at Ezlo!