From 67e0197a7ae929562e0fbc9c92267de2ab9af3e1 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 25 Oct 2024 14:19:46 +0200 Subject: [PATCH] Fix NYT Games connection max streak (#129149) --- homeassistant/components/nyt_games/sensor.py | 2 +- tests/components/nyt_games/snapshots/test_sensor.ambr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/nyt_games/sensor.py b/homeassistant/components/nyt_games/sensor.py index 57759fb354d..01b2db4620b 100644 --- a/homeassistant/components/nyt_games/sensor.py +++ b/homeassistant/components/nyt_games/sensor.py @@ -139,7 +139,7 @@ CONNECTIONS_SENSORS: tuple[NYTGamesConnectionsSensorEntityDescription, ...] = ( state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfTime.DAYS, device_class=SensorDeviceClass.DURATION, - value_fn=lambda connections: connections.current_streak, + value_fn=lambda connections: connections.max_streak, ), ) diff --git a/tests/components/nyt_games/snapshots/test_sensor.ambr b/tests/components/nyt_games/snapshots/test_sensor.ambr index fdec7d58d9d..84b74a26f0d 100644 --- a/tests/components/nyt_games/snapshots/test_sensor.ambr +++ b/tests/components/nyt_games/snapshots/test_sensor.ambr @@ -98,7 +98,7 @@ 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0', + 'state': '2', }) # --- # name: test_all_entities[sensor.connections_last_played-entry]