1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-22 19:53:46 +01:00
This commit is contained in:
J. Nick Koston
2025-10-15 18:26:23 -10:00
parent 9b6707c1c0
commit 447ee3da39

View File

@@ -68,7 +68,9 @@ async def test_sensor_filters_sliding_window(
# Get the sensor name from the key mapping
sensor_name = key_to_sensor.get(state.key)
if sensor_name and sensor_name in sensor_states:
if not sensor_name or sensor_name not in sensor_states:
return
sensor_states[sensor_name].append(state.state)
# Check if we received the expected final value