Help with Apex coding, two conditions

Exus

Community Member
View Badges
Joined
Mar 28, 2021
Messages
98
Reaction score
15
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:

Gumbies R Us

God, Bouldering, and Reefing
View Badges
Joined
Nov 10, 2022
Messages
29,406
Reaction score
52,020
Location
North Georgia
Rating - 0%
0   0   0
Bumping your post!
 

TOP 10 Trending Threads

HOW DO YOU ADJUST YOUR CUC AS ALGAE DISAPPEARS?

  • Capture and re-home CUC

    Votes: 7 7.1%
  • Increase white light/hours in tank to spur algae growth to feed CUC

    Votes: 6 6.1%
  • Feed nori to support CUC

    Votes: 35 35.4%
  • Feed herbivore pellets to support CUC

    Votes: 33 33.3%
  • Allow attrition to balance CUC and algae

    Votes: 43 43.4%
  • Provide macro algae to feed CUC

    Votes: 6 6.1%
  • Introduce CUC predators

    Votes: 1 1.0%
  • Other (please explain)

    Votes: 11 11.1%
Back
Top