Discovery problems

This commit is contained in:
2026-04-13 01:44:33 +02:00
parent 009fbfcd84
commit d29470254b

View File

@@ -786,7 +786,7 @@ def publish_state(client):
states[str(i)] = round(val, 1)
client.publish(gt["state"], str(round(val, 1)), retain=True)
client.publish(gt["status"], "online", retain=True)
info(f"Gauge {i} state: {val:.1f} step={g._current_step}")
info(f"G{i} v={val:.1f} tgt={gauge_targets[i]:.1f} step={g._current_step}")
client.publish(T_STATE, ujson.dumps(states), retain=True)
@@ -893,6 +893,7 @@ def main():
moved_any = True
if moved_any:
publish_state(client_ref)
delay_us = 1_000_000 // MICROSTEPS_PER_SECOND
utime.sleep_us(delay_us)
else: