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

@@ -117,5 +117,5 @@ class InfosG3P(Infos):
name = str(f'info-id.0x{addr:x}')
update = False
self.tracer.log(level, f'{name} : {result}{unit}'
self.tracer.log(level, f'GEN3PLUS: {name} : {result}{unit}'
f' update: {update}')

View File

@@ -116,6 +116,8 @@ class InverterG3P(Inverter, ConnectionG3P):
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'InverterG3P.close() l{self.l_addr} | r{self.r_addr}')
super().close() # call close handler in the parent class