Help with Apex coding, two conditions

Exus

Community Member
View Badges
Joined
Mar 28, 2021
Messages
78
Reaction score
9
Location
USA
Rating - 0%
0   0   0
So I've been having issues with my Radion lights randomly turning on in the middle of the night when it loses Bluetooth connection, and waiting to hear back from support as this is a recurring issue.

I want to setup my setup alarms such that if these two conditions are both met, to send me an alarm.

1. If Time 01:30 to 10:00 Then On
2. If Output Left_Light Watts > 10 Then On

If during 01:30AM to 10:00AM, the wattage to lights is greater than 10 watts, send me an alarm. I tried using "&" but can't get it to work.

Update:
So I think I got it, if someone can check this for me.

I created a virutal outlet called "Light_Issue" with the code
Fallback OFF
Set OFF
If Output Left_Light Watts > 10 Then ON
If Output Right_Light Watts > 10 Then ON
If Time 10:00 to 01:30 Then OFF


Then in Emailalm
If Output Light_Issue = ON Then ON

Would this code work the way I expect? If Left_Light or Right_Light Watts > 10 Then ON, but if it's during normal light hours from 10:00AM to 1:30AM Then OFF.
 
Last edited:

Stuck to your aquarium: Do you put reef-related stickers on or around your reef system?

  • I have reef-related stickers everywhere!

    Votes: 6 2.8%
  • I have some reef-related stickers on or around my reef system.

    Votes: 61 28.4%
  • I have some reef-related stickers, but not on my reef system.

    Votes: 47 21.9%
  • I don’t have reef-related stickers, but I am interested in getting some.

    Votes: 25 11.6%
  • I have no interest in reef-related stickers.

    Votes: 74 34.4%
  • Other.

    Votes: 2 0.9%
Back
Top