Influx: prevent publishing rarely-changing values (#19042)

This commit is contained in:
userwithoutpassword 2025-02-22 10:38:54 +01:00 • committed by GitHub
parent b4eb7b28eb
commit 7ab7269952
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -205,9 +205,18 @@ func runRoot(cmd *cobra.Command, args []string) {
if err == nil && influx != nil {
// eliminate duplicate values
dedupe := pipe.NewDeduplicator(30*time.Minute,
keys.VehicleSoc, keys.VehicleRange, keys.VehicleOdometer,
keys.TariffCo2, keys.TariffFeedIn, keys.TariffGrid,
keys.ChargedEnergy, keys.ChargeRemainingEnergy)
keys.VehicleSoc,
keys.VehicleRange,
keys.VehicleOdometer,
keys.TariffCo2,
keys.TariffCo2Home,
keys.TariffCo2Loadpoints,
keys.TariffFeedIn,
keys.TariffGrid,
keys.TariffPriceHome,
keys.TariffPriceLoadpoints,
keys.ChargedEnergy,
keys.ChargeRemainingEnergy)
go influx.Run(site, dedupe.Pipe(
pipe.NewDropper(append(ignoreLogs, ignoreEmpty, keys.Forecast)...).Pipe(tee.Attach()),
))