diff --git a/gaugemqttcontinuous.py b/gaugemqttcontinuous.py index 97e0ad2..d2cabb5 100644 --- a/gaugemqttcontinuous.py +++ b/gaugemqttcontinuous.py @@ -790,14 +790,10 @@ def publish_discovery(client): def publish_state(client): - info("publish_state called") for i, g in enumerate(gauge_objects): gt = gauge_topics[i] val = g.get() - info(f"pub G{i} get()={val} step={g._current_step}") - s = str(val) - client.publish(gt["state"], s) - info(f"pub to {gt['state']}: {s}") + client.publish(gt["state"], str(val)) # --------------------------------------------------------------------------- @@ -899,7 +895,6 @@ def main(): direction = 1 if current_target > g._current_step else -1 steps_to_move = current_target - g._current_step steps_to_move = max(-5, min(5, steps_to_move)) - info(f"G{i} tgt={gauge_targets[i]:.1f} cur_step={g._current_step} target_step={current_target} dir={direction} moving={steps_to_move}") for _ in range(abs(steps_to_move)): g.step(direction) moved_any = True