From b9993a12f141c57a8cdec47c7d412d0c533b672b Mon Sep 17 00:00:00 2001 From: DJObleezy <156115770+Djobleezy@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:32:43 -0700 Subject: [PATCH] Update state_manager.py --- state_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/state_manager.py b/state_manager.py index 0c745fb..8f978fa 100644 --- a/state_manager.py +++ b/state_manager.py @@ -93,7 +93,7 @@ class StateManager: arrow_history[key] = [ {"time": entry.get("t", ""), "value": entry.get("v", 0), - "arrow": ""} # Default empty arrow + "arrow": entry.get("a", "")} # Use saved arrow value for entry in values ] @@ -146,9 +146,9 @@ class StateManager: if isinstance(values, list) and values: # Only store recent history (last 2 hours) recent_values = values[-120:] if len(values) > 120 else values - # Use shorter field names and remove unnecessary fields + # Use shorter field names and preserve arrow directions compact_arrow_history[key] = [ - {"t": entry["time"], "v": entry["value"]} + {"t": entry["time"], "v": entry["value"], "a": entry["arrow"]} for entry in recent_values ]