diff --git a/core/th7/service.go b/core/th7/service.go index 0a6e289..8f1c249 100644 --- a/core/th7/service.go +++ b/core/th7/service.go @@ -81,6 +81,8 @@ func startCacheService(t *TH7Adapter) { for k := range t.cfg.Channels { tc := t.cfg.Channels[k].Thermo + data[k].Unit = t.cfg.Channels[k].Unit + data[k].Id = t.cfg.Channels[k].Id // if we can apply CJC with this configuration ... if thermocouple.WithinTemperatureRange(tc, pcb_temperature) { @@ -92,8 +94,6 @@ func startCacheService(t *TH7Adapter) { } data[k].Value -= cjc_uv - data[k].Unit = t.cfg.Channels[k].Unit - data[k].Id = t.cfg.Channels[k].Id } // CJC can not be applied