Use snapshot platform helper in Flexit bacnet (#117428)

This commit is contained in:
Joost Lekkerkerker 2024-05-14 15:10:21 +02:00 committed by GitHub
parent 09fccf5188
commit 92bb76ed24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 41 additions and 635 deletions

View file

@ -1,35 +1,5 @@
# serializer version: 1 # serializer version: 1
# name: test_climate_entity # name: test_climate_entity[climate.device_name-entry]
StateSnapshot({
'attributes': ReadOnlyDict({
'current_temperature': 19.0,
'friendly_name': 'Device Name',
'hvac_action': <HVACAction.HEATING: 'heating'>,
'hvac_modes': list([
<HVACMode.OFF: 'off'>,
<HVACMode.FAN_ONLY: 'fan_only'>,
]),
'max_temp': 30,
'min_temp': 10,
'preset_mode': 'boost',
'preset_modes': list([
'away',
'home',
'boost',
]),
'supported_features': <ClimateEntityFeature: 401>,
'target_temp_step': 0.5,
'temperature': 22.0,
}),
'context': <ANY>,
'entity_id': 'climate.device_name',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'fan_only',
})
# ---
# name: test_climate_entity.1
EntityRegistryEntrySnapshot({ EntityRegistryEntrySnapshot({
'aliases': set({ 'aliases': set({
}), }),
@ -75,3 +45,33 @@
'unit_of_measurement': None, 'unit_of_measurement': None,
}) })
# --- # ---
# name: test_climate_entity[climate.device_name-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'current_temperature': 19.0,
'friendly_name': 'Device Name',
'hvac_action': <HVACAction.HEATING: 'heating'>,
'hvac_modes': list([
<HVACMode.OFF: 'off'>,
<HVACMode.FAN_ONLY: 'fan_only'>,
]),
'max_temp': 30,
'min_temp': 10,
'preset_mode': 'boost',
'preset_modes': list([
'away',
'home',
'boost',
]),
'supported_features': <ClimateEntityFeature: 401>,
'target_temp_step': 0.5,
'temperature': 22.0,
}),
'context': <ANY>,
'entity_id': 'climate.device_name',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'fan_only',
})
# ---

View file

@ -569,563 +569,3 @@
'state': '60', 'state': '60',
}) })
# --- # ---
# name: test_numbers[number.device_name_power_factor-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'away_extract_fan_setpoint',
'unique_id': '0000-0001-away_extract_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '30',
})
# ---
# name: test_numbers[number.device_name_power_factor_10-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor_10',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'home_supply_fan_setpoint',
'unique_id': '0000-0001-home_supply_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor_10-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor_10',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '60',
})
# ---
# name: test_numbers[number.device_name_power_factor_2-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor_2',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'away_supply_fan_setpoint',
'unique_id': '0000-0001-away_supply_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor_2-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor_2',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '40',
})
# ---
# name: test_numbers[number.device_name_power_factor_3-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor_3',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'cooker_hood_extract_fan_setpoint',
'unique_id': '0000-0001-cooker_hood_extract_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor_3-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor_3',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '90',
})
# ---
# name: test_numbers[number.device_name_power_factor_4-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor_4',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'cooker_hood_supply_fan_setpoint',
'unique_id': '0000-0001-cooker_hood_supply_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor_4-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor_4',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '100',
})
# ---
# name: test_numbers[number.device_name_power_factor_5-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor_5',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'fireplace_extract_fan_setpoint',
'unique_id': '0000-0001-fireplace_extract_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor_5-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor_5',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '10',
})
# ---
# name: test_numbers[number.device_name_power_factor_6-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor_6',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'fireplace_supply_fan_setpoint',
'unique_id': '0000-0001-fireplace_supply_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor_6-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor_6',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '20',
})
# ---
# name: test_numbers[number.device_name_power_factor_7-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor_7',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'high_extract_fan_setpoint',
'unique_id': '0000-0001-high_extract_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor_7-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor_7',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '70',
})
# ---
# name: test_numbers[number.device_name_power_factor_8-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor_8',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'high_supply_fan_setpoint',
'unique_id': '0000-0001-high_supply_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor_8-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor_8',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '80',
})
# ---
# name: test_numbers[number.device_name_power_factor_9-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
}),
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'number',
'entity_category': None,
'entity_id': 'number.device_name_power_factor_9',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <NumberDeviceClass.POWER_FACTOR: 'power_factor'>,
'original_icon': None,
'original_name': 'Power factor',
'platform': 'flexit_bacnet',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'home_extract_fan_setpoint',
'unique_id': '0000-0001-home_extract_fan_setpoint',
'unit_of_measurement': '%',
})
# ---
# name: test_numbers[number.device_name_power_factor_9-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power_factor',
'friendly_name': 'Device Name Power factor',
'max': 100,
'min': 0,
'mode': <NumberMode.SLIDER: 'slider'>,
'step': 1,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'number.device_name_power_factor_9',
'last_changed': <ANY>,
'last_updated': <ANY>,
'state': '50',
})
# ---

View file

@ -8,7 +8,7 @@ from homeassistant.const import Platform
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er from homeassistant.helpers import entity_registry as er
from tests.common import MockConfigEntry from tests.common import MockConfigEntry, snapshot_platform
from tests.components.flexit_bacnet import setup_with_selected_platforms from tests.components.flexit_bacnet import setup_with_selected_platforms
@ -24,13 +24,4 @@ async def test_binary_sensors(
await setup_with_selected_platforms( await setup_with_selected_platforms(
hass, mock_config_entry, [Platform.BINARY_SENSOR] hass, mock_config_entry, [Platform.BINARY_SENSOR]
) )
entity_entries = er.async_entries_for_config_entry( await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)
entity_registry, mock_config_entry.entry_id
)
assert entity_entries
for entity_entry in entity_entries:
assert entity_entry == snapshot(name=f"{entity_entry.entity_id}-entry")
assert hass.states.get(entity_entry.entity_id) == snapshot(
name=f"{entity_entry.entity_id}-state"
)

View file

@ -8,11 +8,9 @@ from homeassistant.const import Platform
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
import homeassistant.helpers.entity_registry as er import homeassistant.helpers.entity_registry as er
from tests.common import MockConfigEntry from tests.common import MockConfigEntry, snapshot_platform
from tests.components.flexit_bacnet import setup_with_selected_platforms from tests.components.flexit_bacnet import setup_with_selected_platforms
ENTITY_CLIMATE = "climate.device_name"
async def test_climate_entity( async def test_climate_entity(
hass: HomeAssistant, hass: HomeAssistant,
@ -24,5 +22,4 @@ async def test_climate_entity(
"""Test the initial parameters.""" """Test the initial parameters."""
await setup_with_selected_platforms(hass, mock_config_entry, [Platform.CLIMATE]) await setup_with_selected_platforms(hass, mock_config_entry, [Platform.CLIMATE])
assert hass.states.get(ENTITY_CLIMATE) == snapshot await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)
assert entity_registry.async_get(ENTITY_CLIMATE) == snapshot

View file

@ -13,7 +13,7 @@ from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_registry as er from homeassistant.helpers import entity_registry as er
from tests.common import MockConfigEntry from tests.common import MockConfigEntry, snapshot_platform
from tests.components.flexit_bacnet import setup_with_selected_platforms from tests.components.flexit_bacnet import setup_with_selected_platforms
ENTITY_ID = "number.device_name_fireplace_supply_fan_setpoint" ENTITY_ID = "number.device_name_fireplace_supply_fan_setpoint"
@ -29,15 +29,8 @@ async def test_numbers(
"""Test number states are correctly collected from library.""" """Test number states are correctly collected from library."""
await setup_with_selected_platforms(hass, mock_config_entry, [Platform.NUMBER]) await setup_with_selected_platforms(hass, mock_config_entry, [Platform.NUMBER])
entity_entries = er.async_entries_for_config_entry(
entity_registry, mock_config_entry.entry_id
)
assert entity_entries await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)
for entity_entry in entity_entries:
assert entity_entry == snapshot(name=f"{entity_entry.entity_id}-entry")
assert (state := hass.states.get(entity_entry.entity_id))
assert state == snapshot(name=f"{entity_entry.entity_id}-state")
async def test_numbers_implementation( async def test_numbers_implementation(

View file

@ -8,7 +8,7 @@ from homeassistant.const import Platform
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er from homeassistant.helpers import entity_registry as er
from tests.common import MockConfigEntry from tests.common import MockConfigEntry, snapshot_platform
from tests.components.flexit_bacnet import setup_with_selected_platforms from tests.components.flexit_bacnet import setup_with_selected_platforms
@ -22,13 +22,5 @@ async def test_sensors(
"""Test sensor states are correctly collected from library.""" """Test sensor states are correctly collected from library."""
await setup_with_selected_platforms(hass, mock_config_entry, [Platform.SENSOR]) await setup_with_selected_platforms(hass, mock_config_entry, [Platform.SENSOR])
entity_entries = er.async_entries_for_config_entry(
entity_registry, mock_config_entry.entry_id
)
assert entity_entries await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)
for entity_entry in entity_entries:
assert entity_entry == snapshot(name=f"{entity_entry.entity_id}-entry")
assert hass.states.get(entity_entry.entity_id) == snapshot(
name=f"{entity_entry.entity_id}-state"
)

View file

@ -16,7 +16,7 @@ from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_registry as er from homeassistant.helpers import entity_registry as er
from tests.common import MockConfigEntry from tests.common import MockConfigEntry, snapshot_platform
from tests.components.flexit_bacnet import setup_with_selected_platforms from tests.components.flexit_bacnet import setup_with_selected_platforms
ENTITY_ID = "switch.device_name_electric_heater" ENTITY_ID = "switch.device_name_electric_heater"
@ -32,15 +32,8 @@ async def test_switches(
"""Test switch states are correctly collected from library.""" """Test switch states are correctly collected from library."""
await setup_with_selected_platforms(hass, mock_config_entry, [Platform.SWITCH]) await setup_with_selected_platforms(hass, mock_config_entry, [Platform.SWITCH])
entity_entries = er.async_entries_for_config_entry(
entity_registry, mock_config_entry.entry_id
)
assert entity_entries await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)
for entity_entry in entity_entries:
assert entity_entry == snapshot(name=f"{entity_entry.entity_id}-entry")
assert (state := hass.states.get(entity_entry.entity_id))
assert state == snapshot(name=f"{entity_entry.entity_id}-state")
async def test_switches_implementation( async def test_switches_implementation(