emerald-hws 0.0.15__tar.gz → 0.0.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emerald_hws
3
- Version: 0.0.15
3
+ Version: 0.0.16
4
4
  Summary: A package to manipulate and monitor Emerald Heat Pump Hot Water Systems
5
5
  Author-email: Ross Williamson <ross@inertia.net.nz>
6
6
  License-Expression: MIT
@@ -459,8 +459,17 @@ class EmeraldHWS():
459
459
  """
460
460
  full_status = self.getFullStatus(id)
461
461
  if full_status:
462
+ # Try to get work_state from last_state (updated via MQTT)
463
+ if full_status.get("last_state") and "work_state" in full_status.get("last_state"):
464
+ work_state = full_status.get("last_state").get("work_state")
465
+ # work_state: 0=off/idle, 1=actively heating, 2=on but not heating
466
+ return (work_state == 1)
467
+
468
+ # Fallback to device_operation_status if work_state not available yet
469
+ # (e.g., before first MQTT update after initialization)
462
470
  heating_status = full_status.get("device_operation_status")
463
471
  return (heating_status == 1)
472
+
464
473
  return False
465
474
 
466
475
  def currentMode(self, id):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emerald_hws
3
- Version: 0.0.15
3
+ Version: 0.0.16
4
4
  Summary: A package to manipulate and monitor Emerald Heat Pump Hot Water Systems
5
5
  Author-email: Ross Williamson <ross@inertia.net.nz>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes