fixed payload for last mqtt change

This commit is contained in:
avollkopf 2024-02-23 06:47:17 +01:00
parent 1450cd45d9
commit 8cab633291
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,3 @@
__version__ = "4.3.2.a9"
__version__ = "4.3.2.a10"
__codename__ = "Winter Storm"

View file

@ -545,12 +545,19 @@ class FermentationController:
# send mqtt update for active femrentersteps
for fermenter in fermentersteps:
active = False
for step in fermenter['steps']:
if step['status'] == 'A':
active=True
active_step=step
# self.cbpi.push_update("cbpi/{}/{}/{}".format(key,fermenter['id'],step['id']), step)
self.cbpi.push_update("cbpi/{}/{}".format(key,fermenter['id']), step)
#else:
# self.cbpi.push_update("cbpi/{}/{}/{}".format(key,fermenter['id'],step['id']), "")
# self.cbpi.push_update("cbpi/{}/{}".format(key,fermenter['id']), "")
if active:
self.cbpi.push_update("cbpi/{}/{}".format(key,fermenter['id']), active_step)
else:
self.cbpi.push_update("cbpi/{}/{}".format(key,fermenter['id']), "")
async def call_action(self, id, action, parameter) -> None: