Skip to content

Add sun-geometry App Intents for Shortcuts/HomeKit automations#141

Open
daneden wants to merge 2 commits intomainfrom
claude/add-sun-geometry-intents-AlUng
Open

Add sun-geometry App Intents for Shortcuts/HomeKit automations#141
daneden wants to merge 2 commits intomainfrom
claude/add-sun-geometry-intents-AlUng

Conversation

@daneden
Copy link
Copy Markdown
Owner

@daneden daneden commented Apr 24, 2026

Adds 8 new App Intents exposing real-time solar geometry so Shortcuts
and HomeKit automations can drive behaviour from actual azimuth/altitude
rather than clock offsets:

  • GetSunAltitude, GetSunAzimuth, IsSunUp (priority 1)
  • GetSolarNoon, IsSunOnBearing, GetSunPositionAtTime (priority 2)
  • GetNextAltitudeCrossing, GetNextAzimuthCrossing (priority 3)

All default to the current location and now, use LocationAppEntity
(modern approach; older intents still use CLPlacemark for migration),
return Measurement where appropriate, and register with the
existing SolsticeShortcutsProvider.

Extends NTSolar with a shared altitudeAndAzimuth(at:) method so the
existing altitude(at:) continues to work; adds a new azimuth(at:)
alongside it. Crossing searches bisect over a 24-hour window using
1-minute sampling, skipping the azimuth ±180° wrap discontinuity.

Bumps marketing version to 3.2.0.

claude added 2 commits April 24, 2026 09:28
Adds 8 new App Intents exposing real-time solar geometry so Shortcuts
and HomeKit automations can drive behaviour from actual azimuth/altitude
rather than clock offsets:

- GetSunAltitude, GetSunAzimuth, IsSunUp (priority 1)
- GetSolarNoon, IsSunOnBearing, GetSunPositionAtTime (priority 2)
- GetNextAltitudeCrossing, GetNextAzimuthCrossing (priority 3)

All default to the current location and now, use LocationAppEntity
(modern approach; older intents still use CLPlacemark for migration),
return Measurement<UnitAngle> where appropriate, and register with the
existing SolsticeShortcutsProvider.

Extends NTSolar with a shared altitudeAndAzimuth(at:) method so the
existing altitude(at:) continues to work; adds a new azimuth(at:)
alongside it. Crossing searches bisect over a 24-hour window using
1-minute sampling, skipping the azimuth ±180° wrap discontinuity.

Bumps marketing version to 3.2.0.
- Drop @parameter(description:) usage: that init overload requires
  iOS/macOS 26.0+, but the main app target is macOS 15.6.
- Stop using a non-literal default for the tolerance Measurement in
  IsSunOnBearing (visionOS AppIntents requires defaults to be literals).
  Make tolerance optional and default to 60° inside perform().
- Trim AppShortcutsProvider from 12 to 10 entries (the framework cap).
  The priority-3 crossing intents are still registered and available
  via Shortcuts search, just not surfaced in the suggested gallery.
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.

2 participants