morreale Posted July 11, 2014 Posted July 11, 2014 I have a motion sensor configured in a bathroom that control a switchlinc dimmer and i would like to have it come on at 15% from 11p-6a and 100% the rest of the time. i have tried many variations to my programs and this is what i have currently i have tried with and without the parentheses this is the program from 11p-6a, followed by 6a-11p and then the timer to turn them off. the program is working but it always turns on the lights at 100% what am i missing or how can i simplify this code? If ( From 11:00:00PM To 6:00:00AM (next day) And Status 'Master Bathroom / Master Bathroom Lights' is Off And Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On ) Then Set 'Master Bathroom / Master Bathroom Lights' 15% Else - No Actions - (To add one, press 'Action') If ( From 6:00:01AM To 10:59:59PM (next day) And Status 'Master Bathroom / Master Bathroom Lights' is Off And Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On ) Then Set 'Master Bathroom / Master Bathroom Lights' 100% Else - No Actions - (To add one, press 'Action') If Status 'Master Bathroom / Master Bathroom Motion-Sensor' is Off Then Wait 4 minutes Set 'Master Bathroom / Master Bathroom Lights' Off Else - No Actions - (To add one, press 'Action')
LeeG Posted July 11, 2014 Posted July 11, 2014 The second Program If needs a change. It should be (same day) rather than (next day). If(From 6:00:01AMTo 10:59:59PM (same day)And Status 'Master Bathroom / Master Bathroom Lights' is OffAnd Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On)
snowtech Posted July 11, 2014 Posted July 11, 2014 I always use a variable for the "quiet" time. If the time is between 10:59:59 and 6:00 then quiet_time_var= 1, else quiet_time_var= 0 So in the morning when i leave, i dont wake up the rest of the family. So now all the programs based on "quiet time" i set as "if variable is 0 then do this else do that." Have you tried setting manually your light at 15%? I had a similar problem for my lights for the stairs, when i leave the house and its still dark, the hallway light downstairs goes on 10% so iluminates my path on the stairs. Because the bulb i had wasnt dimmable, i couldnt get it at 10%... Hope ur problem is fixed, let us know what u did because there is always people looking for the same answer. Cheers Thiago
morreale Posted July 11, 2014 Author Posted July 11, 2014 The second Program If needs a change. It should be (same day) rather than (next day). If ( From 6:00:01AM To 10:59:59PM (same day) And Status 'Master Bathroom / Master Bathroom Lights' is Off And Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On ) good catch. let me change that and test it.
morreale Posted July 11, 2014 Author Posted July 11, 2014 I always use a variable for the "quiet" time. If the time is between 10:59:59 and 6:00 then quiet_time_var= 1, else quiet_time_var= 0 So in the morning when i leave, i dont wake up the rest of the family. So now all the programs based on "quiet time" i set as "if variable is 0 then do this else do that." Have you tried setting manually your light at 15%? I had a similar problem for my lights for the stairs, when i leave the house and its still dark, the hallway light downstairs goes on 10% so iluminates my path on the stairs. Because the bulb i had wasnt dimmable, i couldnt get it at 10%... Hope ur problem is fixed, let us know what u did because there is always people looking for the same answer. Cheers Thiago good suggestion. yes they are dimmable LED bulbs.
morreale Posted July 11, 2014 Author Posted July 11, 2014 The second Program If needs a change. It should be (same day) rather than (next day). If ( From 6:00:01AM To 10:59:59PM (same day) And Status 'Master Bathroom / Master Bathroom Lights' is Off And Control 'Master Bathroom / Master Bathroom Motion-Sensor' is switched On ) that did the trick..thanks so much for the help.
k5map Posted July 12, 2014 Posted July 12, 2014 morreale, Just curious... why did you put "( )" around your lines in the IF statement?
LeeG Posted July 12, 2014 Posted July 12, 2014 From the initial post "i have tried with and without the parentheses" The parens are not needed in this case since all the statements in the If are Anded. The Programs works the same with or without the parens.
Recommended Posts