Spaces:
Sleeping
Sleeping
Type of temp auto will be known now
Browse files
app.py
CHANGED
|
@@ -21,6 +21,7 @@ od_graph = None
|
|
| 21 |
norm_od_graph = None
|
| 22 |
growth_rate_graph = None
|
| 23 |
all_graph = False
|
|
|
|
| 24 |
|
| 25 |
REQUEST_INTERVAL = 60
|
| 26 |
|
|
@@ -96,8 +97,10 @@ def on_message_worker(client, userdata, message):
|
|
| 96 |
data = json.loads(payload)
|
| 97 |
global experiment
|
| 98 |
global running
|
|
|
|
| 99 |
experiment = data.get("experiment", None)
|
| 100 |
running = data.get("running", [])
|
|
|
|
| 101 |
|
| 102 |
def on_message(client, userdata, message):
|
| 103 |
payload = message.payload.decode("utf-8")
|
|
@@ -215,6 +218,14 @@ if submit_button:
|
|
| 215 |
|
| 216 |
for run in running:
|
| 217 |
st.session_state["jobs"][run] = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
|
| 219 |
# Save the client to the session state
|
| 220 |
st.session_state["client"] = client
|
|
|
|
| 21 |
norm_od_graph = None
|
| 22 |
growth_rate_graph = None
|
| 23 |
all_graph = False
|
| 24 |
+
temp_mqtt_auto = None
|
| 25 |
|
| 26 |
REQUEST_INTERVAL = 60
|
| 27 |
|
|
|
|
| 97 |
data = json.loads(payload)
|
| 98 |
global experiment
|
| 99 |
global running
|
| 100 |
+
global temp_mqtt_auto
|
| 101 |
experiment = data.get("experiment", None)
|
| 102 |
running = data.get("running", [])
|
| 103 |
+
temp_mqtt_auto = data.get("temperature_automation", None)
|
| 104 |
|
| 105 |
def on_message(client, userdata, message):
|
| 106 |
payload = message.payload.decode("utf-8")
|
|
|
|
| 218 |
|
| 219 |
for run in running:
|
| 220 |
st.session_state["jobs"][run] = True
|
| 221 |
+
|
| 222 |
+
if st.session_state["jobs"]["temperature_automation"]:
|
| 223 |
+
if temp_mqtt_auto == "thermostat":
|
| 224 |
+
st.session_state["temp_auto"] = "Heat To Temp"
|
| 225 |
+
elif temp_mqtt_auto == "only_record_temperature":
|
| 226 |
+
st.session_state["temp_auto"] = "Record Temp Only"
|
| 227 |
+
|
| 228 |
+
st.session_state["temp"] = None
|
| 229 |
|
| 230 |
# Save the client to the session state
|
| 231 |
st.session_state["client"] = client
|