@pytest.fixture(name='light')
async def light_fixture(hass: HomeAssistant, mock_entry: MockEntityFixture, mock_light: Light):
    'Fixture for a single light for testing the switch platform.'
    Light.__config__.validate_assignment = False
    light_obj = mock_light.copy(deep=True)
    light_obj._api = mock_entry.api
    light_obj.name = 'Test Light'
    light_obj.is_ssh_enabled = False
    light_obj.light_device_settings.is_indicator_enabled = False
    mock_entry.api.bootstrap.reset_objects()
    mock_entry.api.bootstrap.lights = {light_obj.id: light_obj}
    (await hass.config_entries.async_setup(mock_entry.entry.entry_id))
    (await hass.async_block_till_done())
    assert_entity_counts(hass, Platform.SWITCH, 2, 1)
    (yield light_obj)
    Light.__config__.validate_assignment = True
Fixture for a single light for testing the switch platform.
@pytest.fixture(name='light')
async def light_fixture(hass: HomeAssistant, mock_entry: MockEntityFixture, mock_light: Light):
    
    Light.__config__.validate_assignment = False
    light_obj = mock_light.copy(deep=True)
    light_obj._api = mock_entry.api
    light_obj.name = 'Test Light'
    light_obj.is_ssh_enabled = False
    light_obj.light_device_settings.is_indicator_enabled = False
    mock_entry.api.bootstrap.reset_objects()
    mock_entry.api.bootstrap.lights = {light_obj.id: light_obj}
    (await hass.config_entries.async_setup(mock_entry.entry.entry_id))
    (await hass.async_block_till_done())
    assert_entity_counts(hass, Platform.SWITCH, 2, 1)
    (yield light_obj)
    Light.__config__.validate_assignment = True