Date Range

I searched through this forum but could not find anything on the topic. I’m looking for a way to use a date range for a PLEG condition. I have a house fan and would like to get a notification when it is colder outside than inside, but only during the summer months, say 1 June to 1 Oct.

c_ColderOutside = ((p_OutsideTemp - 2) <= p_InsideTemp) AND (!m_Vacation or !m_Away)

The above condition is true right now as it is colder outside than inside. But how can I add a date range to this? I thought about a Scheduled Input with a start time of *-06-01 and an end time of *10-01, but I believe this will only be true at midnight. Ideally I would like a date range with a time range. After 4:00 PM but before 11:00 PM but only between 1 June and 1 Oct.

Is that easy?

Create a schedule called

SummerAndEarlyFall (On Absolute June 1 at 00:00:00, specify the year as “")
Off Absolute Oct 1 at 00:00:00, specify the year as "

Save the configuration. It should be false now, but that’s only because it’s the default state. It will change on the dates specify. You can use the “Do It Now” to change the timer state for testing.
But remember to use “Do It Now” to get it into the current state … because PLEG will only change the current state at the specified times, it stays the same value in between the two intervals.

So I was going down the right path. Thanks.
Am I correct in appending the SummerAndEarlyFall schedule at the end like below?

c_ColderOutside = (((p_OutsideTemp - 2) <= p_InsideTemp) AND (!m_Vacation or !m_Away)) AND s_SummerAndEarlyFall

Trial and error and I got it. :slight_smile:

((p_OutsideTemp - 1.5) <= p_InsideTemp) AND ((!m_Vacation or !m_Away) AND (s_SummerTime AND s_DailyAfternoon))

s_SummerTime = On @ *-06-01 and Off @ *-10-01
s_DailyAfternoon = S-S On @ 16:00:00 and Off @ 23:00:00

Everything was of course false. When I changed (s_SummerTime AND s_DailyAfternoon) to (!s_SummerTime AND !s_DailyAfternoon) it became true.

I do use the absolute schedule for a similar task (boiler operation @ !summer / irrigation @ summer) - see attached screenshot for setting “Summer” schedule.
It happens from time to time that outside the schedule (i.e. not summer) it for some reason changes back to summer and boiler which is depended on a condition involving !summer will not operate.
My Vera is set by a mechanical timer to power recycle everyday this solves me many other issues but maybe causes this instability of the absolute schedule. I would like to find a condition which will check everyday if a TODAY is within a certain DATE Range or any other full-proof better scheduling solution to enable a reliable date range conditioning.


Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules