From 18f855eb253b8965036b96d51d1d71bf483775dc Mon Sep 17 00:00:00 2001 From: Daniel Raper Date: Sun, 8 Dec 2024 22:31:58 +0000 Subject: [PATCH] Fix tests --- tests/test_binary_sensor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_binary_sensor.py b/tests/test_binary_sensor.py index 84c7210..96aedcd 100644 --- a/tests/test_binary_sensor.py +++ b/tests/test_binary_sensor.py @@ -72,8 +72,7 @@ def test_charging_binary_sensor(mock_hass, mock_coordinator, mock_client) -> Non "mode": "CONNECTED", "allSessionSlots": [], } - sensor._last_reading = {"power": {"watt": 100}, "batterySoc": {"wh": 40}} - assert sensor._calculate_state() is True + assert sensor.is_on() is True def test_pending_approval_binary_sensor(