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:

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 32 16.4%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 11 5.6%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.5%
  • I wear reef gear primarily to relax where I live.

    Votes: 25 12.8%
  • I don’t wear gear from reef brands.

    Votes: 114 58.5%
  • Other.

    Votes: 12 6.2%
Back
Top