Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

Commit f88d577

Browse files
committed
Updated so API is only called when needed
1 parent b4727c4 commit f88d577

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

SunButton/thing.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ func (ua *UnitAsset) processFeedbackLoop() {
244244
return
245245
}
246246
}
247+
ua.oldLongitude = ua.Longitude
248+
ua.oldLatitude = ua.Latitude
247249
layout := "15:04:05"
248250
sunrise, _ := time.Parse(layout, ua.data.Results.Sunrise) // Saves the sunrise in the layout format.
249251
sunset, _ := time.Parse(layout, ua.data.Results.Sunset) // Saves the sunset in the layout format.

0 commit comments

Comments
 (0)