clear daily energy production at midnight

This commit is contained in:
Stefan Allius
2024-04-06 00:04:25 +02:00
parent d6cc211a51
commit 8fc8a29be2
9 changed files with 327 additions and 176 deletions

View File

@@ -161,7 +161,7 @@ class InfosG3(Infos):
update = False
name = str(f'info-id.0x{addr:x}')
self.tracer.log(level, f'{name} : {result}{unit}'
self.tracer.log(level, f'GEN3: {name} : {result}{unit}'
f' update: {update}')
i += 1

View File

@@ -116,6 +116,8 @@ class InverterG3(Inverter, ConnectionG3):
await self.mqtt.publish(f"{self.discovery_prfx}{component}"
f"/{node_id}{id}/config", data_json)
self.db.reg_clr_at_midnight(f'{self.entity_prfx}{node_id}')
def close(self) -> None:
logging.debug(f'InverterG3.close() l{self.l_addr} | r{self.r_addr}')
super().close() # call close handler in the parent class