Fix NewHeader calls for infinitime update

This commit is contained in:
Elara 2024-04-01 20:41:42 -07:00
parent c0937918b1
commit 6904e95913

View File

@ -109,6 +109,7 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
// Add temperature event // Add temperature event
err = dev.AddWeatherEvent(weather.TemperatureEvent{ err = dev.AddWeatherEvent(weather.TemperatureEvent{
TimelineHeader: weather.NewHeader( TimelineHeader: weather.NewHeader(
time.Now(),
weather.EventTypeTemperature, weather.EventTypeTemperature,
time.Hour, time.Hour,
), ),
@ -122,6 +123,7 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
// Add precipitation event // Add precipitation event
err = dev.AddWeatherEvent(weather.PrecipitationEvent{ err = dev.AddWeatherEvent(weather.PrecipitationEvent{
TimelineHeader: weather.NewHeader( TimelineHeader: weather.NewHeader(
time.Now(),
weather.EventTypePrecipitation, weather.EventTypePrecipitation,
time.Hour, time.Hour,
), ),
@ -135,6 +137,7 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
// Add wind event // Add wind event
err = dev.AddWeatherEvent(weather.WindEvent{ err = dev.AddWeatherEvent(weather.WindEvent{
TimelineHeader: weather.NewHeader( TimelineHeader: weather.NewHeader(
time.Now(),
weather.EventTypeWind, weather.EventTypeWind,
time.Hour, time.Hour,
), ),
@ -150,6 +153,7 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
// Add cloud event // Add cloud event
err = dev.AddWeatherEvent(weather.CloudsEvent{ err = dev.AddWeatherEvent(weather.CloudsEvent{
TimelineHeader: weather.NewHeader( TimelineHeader: weather.NewHeader(
time.Now(),
weather.EventTypeClouds, weather.EventTypeClouds,
time.Hour, time.Hour,
), ),
@ -162,6 +166,7 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
// Add humidity event // Add humidity event
err = dev.AddWeatherEvent(weather.HumidityEvent{ err = dev.AddWeatherEvent(weather.HumidityEvent{
TimelineHeader: weather.NewHeader( TimelineHeader: weather.NewHeader(
time.Now(),
weather.EventTypeHumidity, weather.EventTypeHumidity,
time.Hour, time.Hour,
), ),
@ -174,6 +179,7 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
// Add pressure event // Add pressure event
err = dev.AddWeatherEvent(weather.PressureEvent{ err = dev.AddWeatherEvent(weather.PressureEvent{
TimelineHeader: weather.NewHeader( TimelineHeader: weather.NewHeader(
time.Now(),
weather.EventTypePressure, weather.EventTypePressure,
time.Hour, time.Hour,
), ),