Sunrise-Sunset and Calendar functions for edge

In this version was fixed.
Is a copy and paste error, jajaja :wink:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Name        β”‚ Virtual Calendar Mc                  β”‚
β”‚ Version     β”‚ 2022-06-12T17:17:35.956613329        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
1 Like

You can make two β€œand” conditions in one routine:

Or better putting the month 12 as a precondition

You can also add one specific hour

2 Likes

@Mariano_Colmenarejo
Mariano can you add Local Time offset to actions in Routines?
That way I can schedule Daylight Savings time change. In US some states change daylight saving time and some don’t. It’s the same with many countries, besides that they also change on different date.

Thank you

I shouldn’t need to do anything for new versions to be picked up right? I am still stuck on 2022-06-11 for some reason.

If you use the cli you can install it manually by overwriting the version you have.

If you don’t use CLI, It will be updated automatically within a maximum period of 12 hours. You may have to clear the app cache to see new presentations and profiles.

That’s just it, it has been well over 12 hours.

On iOS there is no clear cache option.

I have other Edge drivers that have updated okay.

Weird.

The version published on the channel was the one from 2022-06-11, I don’t know why.
It has happened to me other times.
I have republished it with today’s date.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Name        β”‚ Virtual Calendar Mc                  β”‚β”‚
β”‚ Version     β”‚ 2022-06-13T19:03:24.461988296        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Bingo. That did it. Thanks.

1 Like

So far the Sunrise/Sunset time has not changed at all since Saturday the day I installed the Virtual Calendar Device. I’ve pulled to refresh, and it doesn’t change it. The history of the device only shows entries from Saturday.

Hi @DaWeav,

Is the time shown in the details view correct?
The sunrise and sunset are wrong?
The subirse and sunset offsets change every minute?

If the time is correct, the driver timer has not stopped.

It might have been stopped by a hub reboot or driver update, but it should restart automatically.

The sunrise and sunset calculation refreshes it every hour on the dot 3 times in 3 minutes, so as not to waste hub cycles. If the calculation has not changed, it is not seen in the history, you can see it in the log with the CLI.

In history only events are shown in which there is any change

On the dates that we are, the time of sunrise or sunset changes 1 minute every two or three days, they rarely change both on the same day.

You can check the calculations with a weather web

If they are not correct I will look to see if there is an error in the driver

FYI - sunrise and sunset times are correct on my Installation.

1 Like

I have no problems either. All looks good so far. Although I have used this device about a day now.

1 Like

As @DaWeav idea and @milandjurovic71 request I have modified the Virtual Calendar Mc driver to adjust the local time offset with UTC from a custom capability.

In this way you can make an automation to change from summer to winter time and vice versa.

As it has a new capability, the current offset value is lost and therefore I will not update it automatically since the local time offset would be set to 0. and would cause the automations made to fail.

Therefore the current version will be renamed -(OLD) and the new driver version 2 as Virtual Calendar Mc.

You can make a manual update with the driver change in the App when it suits you best. You will have to enter your offset again with the UTC time. The rest of the data latitude, longitude and automations will not be lost or modified

New driver version

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Name        β”‚ Virtual Calendar Mc                  β”‚
β”‚ Package Key β”‚ virtual-calendar-v2                  β”‚
β”‚ Version     β”‚ 2022-06-14T16:08:23.282538451        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

@DaWeav I changed too one thing that improves the periodic updating of the sunrise and sunset calculations

When I switch to this new version (which I confirm by going back in to Driver to check and the time is resetting based on 0 offset) I am not seeing the new offset option show up and the old one under settings remains …

Did you close the app and clear the cache di is Android?

I have force closed the app.

I’m on iOS so no clear cache option.

I don’t understand what is happening, could you reboot the hub from the IDE.

Too many strange things I’ve been seeing for a few days!

@Mariano_Colmenarejo i don’t see change too. I have latest driver installed


Also there is no Virtual Calendar in THEN part of Routines

@Nezmo, @milandjurovic71,
The driver change method may not work for these virtual devices.

Try add new device and search nearby for a new device to be created.

Let’s see, then delete the old one

1 Like

Add this to the list of oddities … Scanning is not finding anything.

Not sure if it’s relevant but the β€˜old’ driver has not picked-up the renaming either. I can successfully go back to it though. I don’t know if the driver name needs to be unique and perhaps it’s getting confused.