From ee87938c939c7d29752f641996967a1a4ab84a01 Mon Sep 17 00:00:00 2001 From: Nicolas Duhamel Date: Wed, 2 Nov 2022 08:10:31 +0100 Subject: [PATCH] Fix program setpoint not updated --- pkg/device/device.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/device/device.go b/pkg/device/device.go index 45a7435..47688cf 100644 --- a/pkg/device/device.go +++ b/pkg/device/device.go @@ -342,13 +342,13 @@ func (d *Device) handle_program(log *zerolog.Logger, pubchan chan Message) (bool if err != nil { return false, err } + d.State.Setpoint = value if d.CurrentSetpoint != value { log.Info().Msg("publish setpoint update") if err := d.SetSetpoint(value, pubchan); err != nil { return false, err } - d.State.Setpoint = value return true, nil }