Help with Apex coding, two conditions

Exus

Community Member
View Badges
Joined
Mar 28, 2021
Messages
76
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:

Just grow it: Have you ever added CO2 to your reef tank?

  • I currently use a CO2 with my reef tank.

    Votes: 8 7.1%
  • I don’t currently use CO2 with my reef tank, but I have in the past.

    Votes: 4 3.5%
  • I have never used CO2 with my reef tank, but I plan to in the future.

    Votes: 5 4.4%
  • I have never used CO2 with my reef tank and have no plans to in the future.

    Votes: 91 80.5%
  • Other.

    Votes: 5 4.4%
Back
Top