Announcement

Collapse
No announcement yet.

sunset and sunrise variables in Easytrigger expressions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    sunset and sunrise variables in Easytrigger expressions

    I know sunset and sunrise variables are available somewhere in HomeSeer, but I'd like to use them in an expression. This is to set color temperature of lights to a different value every few minutes, based on how far away from sunset or sunrise. I don't see sunset/sunrise listed as a replacement variable. Is there a way to access that from within Easytrigger expressions?

    And if I can find them, can I add and subtract those variables (to get a number of seconds since sunrise or until sunset, for example)?

    #2
    There are standard triggers:
    If the time is this before / after sunrise / sunset
    Won't those do what you want?
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    Comment


      #3
      I don't think scripting variables are available to Easytrigger, but you could use these in an event with Easytrigger. https://help.homeseer.com/help/HS3/s...#.time_related
      HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
      Home Assistant 2024.3
      Operating System: Microsoft Windows 11 Pro - Desktop
      Z-Wave Devices via two Z-Net G3s
      Zigbee Devices via RaspBee on RPi 3b+
      WiFi Devices via Internal Router.

      Enabled Plug-Ins
      AK GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0

      Comment


        #4
        Thanks for the suggestions!

        I already change the color temperature of the lights using sunset/sunrise standard triggers, but only with 4 events. It works fine but the change is a little obvious when it happens. I wanted to change them every 5 minutes, so that each individual change isn't noticeable, but if I used standard triggers, that would be over 100 events. I'd rather use some kind of expression.

        I haven't got into scripts yet but I should spend some time figuring it out, I think that's probably the best way to handle this since the scripting variables are exactly what I need for this.

        Comment


          #5
          I think you are on the right track to consider a script. One possibility that comes to mind would be a recurring event which runs a script that changes the light settings incrementally. I am not familiar with the commands to adjust color temperature of your lights, but if they allow a change as a percentage of the existing settings, then that is one possible way to achieve what you want with a relatively simple script.
          Mike____________________________________________________________ __________________
          HS3 Pro Edition 3.0.0.548, NUC i3

          HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

          Comment


            #6
            Not sure if you could achieve what you want with that but note that you can build schedule time ranges relatively to sunrise and sunset, see bottom of this post:
            https://forums.homeseer.com/forum/ul...41#post1347341

            Comment


              #7
              I did actually use those scheduled time ranges and ended up triggering events based on those, it's a little more convenient than doing the logic in the events themselves. But I'm still just triggering events with them, and each event sets the light to a specific color temperature. Is there a way to use scheduled time ranges as a variable in an expression?

              Comment


                #8
                I did end up finding a way to do this, so I figured I'd record it here in case anyone searches for the same thing.

                The goal wasn't exactly having some arbitrary color temperature at every specific minute of the day, it was really to have a value at sunrise, another value around 11am, then another value at sunset, then another throughout the night. The problem was the changes were jarring. So, I made a "target" virtual light that changed to my target colour temperature at the four times of day. Then I made a "current" virtual light, and I had an event go off every 2 minutes that would move it gradually towards the target. So color temp would change slowly over a couple of hours. Then, I would just set all the lights to the "current" virtual light every few minutes, using easytrigger's set device to another device. The changes are so small they're no longer noticeable, and if I ever want to change the targets, I'm only editing a couple of events, not hundreds of them.

                Comment

                Working...
                X