gadgetfreak Posted April 5, 2023 Share Posted April 5, 2023 I have a scene "Good Night" that turns off all of my lights downstairs (25 lights/devices) when I go upstairs to bed. It is also part of a timed program to all go off at midnight. When I have company sleeping in my guest room in the basement, I want to create a variable called "Sleeping Guests" and, when that variable is set to 1, I want the Good Night scene to do everything EXCEPT 2 of the lights for the hallways - meaning the "Good Night" scene will only control 23 lights/devices. Does anyone know of an easy way to do this without having to create a new scene and replacing it in the program at midnight? Thanks. Link to comment
asbril Posted April 5, 2023 Share Posted April 5, 2023 (edited) 1 hour ago, gadgetfreak said: I have a scene "Good Night" that turns off all of my lights downstairs (25 lights/devices) when I go upstairs to bed. It is also part of a timed program to all go off at midnight. When I have company sleeping in my guest room in the basement, I want to create a variable called "Sleeping Guests" and, when that variable is set to 1, I want the Good Night scene to do everything EXCEPT 2 of the lights for the hallways - meaning the "Good Night" scene will only control 23 lights/devices. Does anyone know of an easy way to do this without having to create a new scene and replacing it in the program at midnight? Thanks. One way is to create a program without IF and in THEN set variable X to 1, ELSE set variable X to 0. When you have guests you run THEN and when guests leave you run ELSE. In my case, I have a few programs that act on a condition in my Google calendar (using Holidays Google Nodeserver) . In your situation you would create a calendar named " Guests" and in that calendar you would create an all-day event on the days that you have guests. In the Administrative Console, IF Guests Calendar is True THEN Variable X = 1 There are other possibilities. Edited April 5, 2023 by asbril Link to comment
MrBill Posted April 5, 2023 Share Posted April 5, 2023 @gadgetfreak Program Goodnight If Time is midnight then Turn off 23 things Run Program Goodnight2 (if) else (Nothing) Program Goodnight2 (DISABLED) If Sleeping Guests = 0 then turn off 2 things else (nothing) The magic: Disabled programs still run when run buy another program. 2 Link to comment
gadgetfreak Posted April 5, 2023 Author Share Posted April 5, 2023 Thank you both for your advice. I really appreciate it. Link to comment
Recommended Posts