Skip to content

Add sun event scheduling (e.g. RunAtSunrise() )#1358

Open
duanemck wants to merge 1 commit intonet-daemon:mainfrom
duanemck:main
Open

Add sun event scheduling (e.g. RunAtSunrise() )#1358
duanemck wants to merge 1 commit intonet-daemon:mainfrom
duanemck:main

Conversation

@duanemck
Copy link

Proposed change

In home automation it is often useful to trigger automations based off sun events such as sunrise or sunset. This feature extends the scheduling extension and wraps the SolarCalculator Nuget library to add a service with methods such as RunAtSunset(). I've only added sunrise, sunset, dusk and dawn though the underlying library supports other events.

As the SolarCalculator requires latitude, longitude and a Solar calculator to work, the new methods could not be added as extensions methods on IScheduler, so instead, a new service was introduced.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • The code compiles without warnings (code quality check)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration are added/changed:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant