storing sg ready mode to db

This commit is contained in:
Nils Reiners
2025-09-25 21:24:45 +02:00
parent b066658eb0
commit 1784b7c283
2 changed files with 10 additions and 6 deletions

View File

@@ -33,8 +33,8 @@ controller = SgReadyController(es)
while True:
now = datetime.now()
if now.second % interval_seconds == 0 and now.microsecond < 100_000:
state = es.get_state_and_store_to_database(db)
controller.perform_action(heat_pump_name='hp_master', meter_name='solaredge_meter', state=state)
state = es.get_state_and_store_to_database(db)
mode = controller.perform_action(heat_pump_name='hp_master', meter_name='solaredge_meter', state=state)
db.store_data('sg_ready', mode)
time.sleep(0.1)