Send internal proxy states to Home-Assistant

Fixes #10

Always register ha entities after connection setup
This commit is contained in:
Stefan Allius
2023-10-12 13:19:56 +02:00
parent 8cb8dea47b
commit 5c940bb7a2

View File

@@ -14,7 +14,7 @@ class Inverter(AsyncStream):
def __init__ (self, reader, writer, addr):
super().__init__(reader, writer, addr, None, True)
self.mqtt = Mqtt()
self.ha_restarts = 0
self.ha_restarts = -1
ha = Config.get('ha')
self.entitiy_prfx = ha['entity_prefix'] + '/'
self.discovery_prfx = ha['discovery_prefix'] + '/'