mode as binary

This commit is contained in:
Nils Reiners
2025-09-25 21:45:09 +02:00
parent ecd0180483
commit f3de1f9280

View File

@@ -35,6 +35,11 @@ while True:
if now.second % interval_seconds == 0 and now.microsecond < 100_000:
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': mode})
if mode == 'mode1':
mode_as_binary = 0
else:
mode_as_binary = 1
db.store_data('sg_ready', {'mode': mode_as_binary})
time.sleep(0.1)