[apparent bug] Using sunset/sunrise with the Rules

I have a few simple rules - turn on the exterior light(s) at sunset, turn them off at sunrise. For example:

  {
    "every": {
      "specific": {
        "reference": "Sunset",
        "offset": {
          "value": {
            "integer": -30
          },
          "unit": "Minute"
        }
      },
      "actions": [
        {
          "command": {
            "devices": [
              "my-device-id"
            ],
            "commands": [
              {
                "component": "main",
                "capability": "switch",
                "command": "on"
              }
            ]
          }
        }
      ]
    }
  }

It works fine, except that sunset and sunrise time are fixed when the rule is created, as opposed to following the actual sunset/sunrise times. I created these rules about 3 months ago, and they still fire at the same UTC time of the day even though the actual sunrise time drifted, not to mention we had a DST clock adjustment.
Using routines works as expected and adjusts the time day by day. So I have a workaround, and it’s not really a show stopper for me. That said, it would be great to fix this behavior. I use rules to consolidate a bunch of simple routines that never change, de-cluttering my routine list.

Did anybody see the same behavior?

Not same behavior but I reported this

Rebooting Hub fixed my rule operation.

Is your location Latitude and Longitude setting correct?

Hi, @7kcajoeb

I asked the engineering team and they mentioned @TapioX is right about these conditions needing a value in Latitude and Longitude.
Please verify they are configured correctly. You can enter the Advanced Users app - locations, and you’ll see those details inside the location.

Thank you @TapioX @nayelyz
I checked my location setting and it’s correct. The rule execution is listed as “Cloud” - makes sense, given that I use Kasa switches through regular cloud integration.

The problem is not that the rules don’t trigger, but that they trigger at the wrong time. Whenever I create the rule, it uses the sunset/sunrise time at that moment, and never adjusts it in the future to follow the actual sunset/sunrise times.

ok, then, the team mentioned we would need more information for the investigation.
To open a report, I need your help by opening support access:

  1. Confirm the email account registered in the forum is the same one you use for SmartThings. If not, please share it with me over DM
  2. Enable support access to your account:
  1. Go to the SmartThings Web (my.smartthings.com)
  2. Log in to your Samsung Account
  3. Select Menu (â‹®) and choose Settings
  4. Toggle on Account Data Access
  5. Select the time period and confirm - In this step, please select “Until turned off”, once the team finishes, we’ll let you know so you can disable it again.

I’ve deleted my only Rule where I use the sunset/sunrise offset at a specific time so I’m not aware if it is a current problem (my only other uses are for time ranges and they don’t make it so obvious).

However it is a familiar problem to me. Reported and repeated in about September 2021. The problem was fixed for me some time last year if I remember correctly. I don’t recall if it made it to its third anniversary.

@nayelyz yes, same email as in the forum. I have enabled account sharing as you requested. Let me know what you found out.

Hi, @7kcajoeb

Sorry, I see you have several routines. Can you let me know the name of the one(s) having the issue, please?

If the name is too long, you can share only the first words, and I’ll find it.

@nayelyz thanks for looking into it. The name is “Scheduled, time-based and aux”. Note this is not a Routine, it’s a Rule.
Routines work as expected, but when I create a Rule with the same functionality, that’s what leads to the issue described.

Sorry, I see all of them in one place from my side, so I used that term without thinking.
I’ll create a report then and once I get more info, I’ll let you know.

Don’t say sorry! Really appreciate your help! Just wanted to make sure the issue description is clear

1 Like