From a3b45b05f187d1a482a980b51db79090cec91237 Mon Sep 17 00:00:00 2001 From: David Bonnes Date: Tue, 31 Dec 2024 15:32:00 +0000 Subject: [PATCH] bugfix --- src/evohomeasync/entities.py | 2 +- tests/tests/__snapshots__/test_v0_installs.ambr | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/evohomeasync/entities.py b/src/evohomeasync/entities.py index add665f..dca9aaa 100644 --- a/src/evohomeasync/entities.py +++ b/src/evohomeasync/entities.py @@ -213,7 +213,7 @@ def temperature_status(self) -> EvoTemperatureStatusResponseT: return { "is_available": temp_status == "Measured", - } | ({} if temp != _TEMP_IS_NA else {"temperature": temp}) # type: ignore[return-value] + } | ({} if temp == _TEMP_IS_NA else {"temperature": temp}) # type: ignore[return-value] @property def temperature(self) -> float | None: diff --git a/tests/tests/__snapshots__/test_v0_installs.ambr b/tests/tests/__snapshots__/test_v0_installs.ambr index ab8f776..cd46ab5 100644 --- a/tests/tests/__snapshots__/test_v0_installs.ambr +++ b/tests/tests/__snapshots__/test_v0_installs.ambr @@ -973,6 +973,10 @@ false ... + ''', + 'one_touch_buttons': ''' + !!python/tuple [] + ''', 'status': ''' can_search_for_contractors: true @@ -1733,8 +1737,6 @@ ' temperature_status: 'is_available: false - temperature: null - ' '3432576': config: "alert_settings:\n communication_failure_active: true\n communication_failure_minutes:\ @@ -2803,6 +2805,10 @@ false ... + ''', + 'one_touch_buttons': ''' + !!python/tuple [] + ''', 'status': ''' can_search_for_contractors: true