From 0261168b0833982d326c962643e25d91c16ea116 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 6 Jun 2025 22:39:29 -0500 Subject: [PATCH] fix flakey tests --- .../integration/fixtures/host_mode_many_entities.yaml | 11 +++++++++-- .../host_mode_many_entities_multiple_connections.yaml | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/integration/fixtures/host_mode_many_entities.yaml b/tests/integration/fixtures/host_mode_many_entities.yaml index d353ea6991..38a4eb00d7 100644 --- a/tests/integration/fixtures/host_mode_many_entities.yaml +++ b/tests/integration/fixtures/host_mode_many_entities.yaml @@ -215,12 +215,12 @@ sensor: binary_sensor: - platform: template name: "Test Binary Sensor 1" + id: test_binary_sensor_1 lambda: return true; - update_interval: 0.1s - platform: template name: "Test Binary Sensor 2" + id: test_binary_sensor_2 lambda: return false; - update_interval: 0.1s switch: - platform: template @@ -322,3 +322,10 @@ button: name: "Test Button" on_press: - logger.log: "Button pressed" + +# Interval to update binary sensors +interval: + - interval: 100ms + then: + - component.update: test_binary_sensor_1 + - component.update: test_binary_sensor_2 diff --git a/tests/integration/fixtures/host_mode_many_entities_multiple_connections.yaml b/tests/integration/fixtures/host_mode_many_entities_multiple_connections.yaml index 26fa51d4f4..dbbcbd72c1 100644 --- a/tests/integration/fixtures/host_mode_many_entities_multiple_connections.yaml +++ b/tests/integration/fixtures/host_mode_many_entities_multiple_connections.yaml @@ -95,12 +95,12 @@ sensor: binary_sensor: - platform: template name: "Test Binary Sensor 1" + id: test_binary_sensor_1 lambda: return true; - update_interval: 0.1s - platform: template name: "Test Binary Sensor 2" + id: test_binary_sensor_2 lambda: return false; - update_interval: 0.1s text_sensor: - platform: template @@ -136,3 +136,10 @@ number: lambda: return 50.0; set_action: - logger.log: "Number set" + +# Interval to update binary sensors +interval: + - interval: 100ms + then: + - component.update: test_binary_sensor_1 + - component.update: test_binary_sensor_2