Greetings. I’ve just moved from ST to HE, and except for a few inconveniences, everything is going great. About 90% of my WebCoRe automations are moved to simple or 5.1 rules, but a few seem more difficult to convert. Of the remaining WebCoRe pistons, all are working, except one.
I have a certain blind that needs to be closed for a certain amount of time during certain months of the year when the sun’s angle is problematic, during a fixed schedule (that does not change with DST).
On ST, this expression worked perfectly:
On HE, the expression: evaluates to:
(expression) time(“00:01”)+time($localNow-$utc) »»» (long) 60000,
reporting (long) - whatever that means, and returning time value of just “00:01”, so it just opens at 1 minute after midnight local time. It fails to calculate:
(expression) time($localNow-$utc) »»» (time) 0,
incorrectly returning (time) 0, instead of time difference between local and utc, which calculates correctly in WebCoRe for ST:
(expression) time($localNow-$utc) »»» (time) -25200002
I thought it might just be that HE version doesn’t like negative time value, but
(expression) time($utc-$localNow) »»» (time) -1
also calculates incorrectly.
I know there are other ways to do this, but hoping someone can educate me on why this expression not working the same on HE as it does on ST. Please help.
(Already learned $twc doesn’t exist on HE and had to set up Openweather to set my “it’s cloudy” virtual switch in another rule).