Help with Apex coding, two conditions

  • Thread starter Thread starter Exus
  • Start date Start date
  • Tagged users Tagged users None

Exus

Active Member
View Badges
Joined
Mar 28, 2021
Messages
102
Reaction score
15
Location
USA
What state or country do you live in
Wisconsin
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:
Bumping your post!
 

WHAT MOST MAKES A BLACK FRIDAY REEF DEAL WORTH CONSIDERING?

  • A real discount on something already on my list

    Votes: 46 76.7%
  • Free or reduced shipping

    Votes: 9 15.0%
  • A useful bundle of gear or supplies

    Votes: 2 3.3%
  • A good price on livestock I’ve already researched

    Votes: 13 21.7%
  • A rare chance to get something hard to find

    Votes: 11 18.3%
  • A seller or brand I trust

    Votes: 11 18.3%
  • I buy when I need something, sale or not

    Votes: 12 20.0%
  • Other (Post in the comments)

    Votes: 1 1.7%
Back
Top
Home
Post thread…
Market
What's new