fixed bean setting bug.

This commit is contained in:
CiscoTheWolf 2023-06-05 22:26:27 +02:00
parent 100891e604
commit fa94782eb9
2 changed files with 2 additions and 1 deletions

View file

@ -37,6 +37,7 @@ class StateSingleton:
def set_desired_expression(self, state):
if state in self.states:
print("Set desired state to: " + self.states[state])
self.desired_expression = self.states[state]
self.new_desired_expression = state
else:

View file

@ -183,7 +183,7 @@ def on_message(client, userdata, message):
if bean_state == "rose":
proot_state.set_desired_expression(0)
elif bean_state == "fell":
proot_state.set_desired_expression(bean_number)
proot_state.set_desired_expression(int(bean_number))
# MQTT broker configuration