Use custom config type

This commit is contained in:
2025-01-08 16:49:31 -05:00
parent fa0a9f4ddc
commit 86653cf589
5 changed files with 102 additions and 33 deletions

View File

@ -24,6 +24,7 @@ type AmbientWeather struct {
// when either "AmbientWeather" or "Wunderground" are selected
// in the "Custom" section of the AWNet app, or the web UI
// of an Ambient WeatherHub
config *AmbientLocalExporterConfig
awnProvider provider.AmbientProvider
wuProvider provider.AmbientProvider
appCtx context.Context
@ -31,7 +32,7 @@ type AmbientWeather struct {
l *zerolog.Logger
}
func New(appCtx context.Context) *AmbientWeather {
func New(appCtx context.Context, awConfig *AmbientLocalExporterConfig) *AmbientWeather {
return &AmbientWeather{
appCtx: appCtx,
}