From 2c44198cb5042bbf53ad05965b33bcb5d12be5c1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 20 Aug 2025 13:06:18 -0500 Subject: [PATCH] preen --- .../fixtures/multi_device_preferences.yaml | 27 +------------------ .../test_multi_device_preferences.py | 12 +-------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/tests/integration/fixtures/multi_device_preferences.yaml b/tests/integration/fixtures/multi_device_preferences.yaml index 4835a057cc..634d7157b2 100644 --- a/tests/integration/fixtures/multi_device_preferences.yaml +++ b/tests/integration/fixtures/multi_device_preferences.yaml @@ -140,32 +140,7 @@ select: ESP_LOGI("test", "Main Mode set to %s", x.c_str()); id(mode_main).state = x; -# Test sensors for reading entity states -sensor: - - platform: template - name: Switch State A - id: switch_state_a - device_id: device_a - lambda: |- - return id(light_device_a).state ? 1.0 : 0.0; - update_interval: 0.5s - - - platform: template - name: Switch State B - id: switch_state_b - device_id: device_b - lambda: |- - return id(light_device_b).state ? 1.0 : 0.0; - update_interval: 0.5s - - - platform: template - name: Switch State Main - id: switch_state_main - lambda: |- - return id(light_main).state ? 1.0 : 0.0; - update_interval: 0.5s - -# Button to trigger preference save/restore test +# Button to trigger preference logging test button: - platform: template name: Test Preferences diff --git a/tests/integration/test_multi_device_preferences.py b/tests/integration/test_multi_device_preferences.py index b9d2202f9d..625f83f16e 100644 --- a/tests/integration/test_multi_device_preferences.py +++ b/tests/integration/test_multi_device_preferences.py @@ -5,7 +5,7 @@ from __future__ import annotations import asyncio import re -from aioesphomeapi import ButtonInfo, NumberInfo, SelectInfo, SensorInfo, SwitchInfo +from aioesphomeapi import ButtonInfo, NumberInfo, SelectInfo, SwitchInfo import pytest from .types import APIClientConnectedFactory, RunCompiledFunction @@ -95,16 +95,6 @@ async def test_multi_device_preferences( ] assert len(selects) == 3, f"Expected 3 'Mode' selects, got {len(selects)}" - # Check sensors for switch state monitoring - state_sensors = [ - e - for e in entities - if isinstance(e, SensorInfo) and "Switch State" in e.name - ] - assert len(state_sensors) == 3, ( - f"Expected 3 'Switch State' sensors, got {len(state_sensors)}" - ) - # Find the test button entity to trigger preference logging buttons = [e for e in entities if isinstance(e, ButtonInfo)] test_button = next((b for b in buttons if b.name == "Test Preferences"), None)