async def test_switch_setup_light(hass: HomeAssistant, mock_entry: MockEntityFixture, light: Light):
    'Test switch entity setup for light devices.'
    entity_registry = er.async_get(hass)
    description = LIGHT_SWITCHES[1]
    (unique_id, entity_id) = ids_from_device_description(Platform.SWITCH, light, description)
    entity = entity_registry.async_get(entity_id)
    assert entity
    assert (entity.unique_id == unique_id)
    state = hass.states.get(entity_id)
    assert state
    assert (state.state == STATE_OFF)
    assert (state.attributes[ATTR_ATTRIBUTION] == DEFAULT_ATTRIBUTION)
    description = LIGHT_SWITCHES[0]
    unique_id = f'{light.id}_{description.key}'
    entity_id = f"switch.test_light_{description.name.lower().replace(' ', '_')}"
    entity = entity_registry.async_get(entity_id)
    assert entity
    assert (entity.disabled is True)
    assert (entity.unique_id == unique_id)
    (await enable_entity(hass, mock_entry.entry.entry_id, entity_id))
    state = hass.states.get(entity_id)
    assert state
    assert (state.state == STATE_OFF)
    assert (state.attributes[ATTR_ATTRIBUTION] == DEFAULT_ATTRIBUTION)
Test switch entity setup for light devices.
async def test_switch_setup_light(hass: HomeAssistant, mock_entry: MockEntityFixture, light: Light):
    
    entity_registry = er.async_get(hass)
    description = LIGHT_SWITCHES[1]
    (unique_id, entity_id) = ids_from_device_description(Platform.SWITCH, light, description)
    entity = entity_registry.async_get(entity_id)
    assert entity
    assert (entity.unique_id == unique_id)
    state = hass.states.get(entity_id)
    assert state
    assert (state.state == STATE_OFF)
    assert (state.attributes[ATTR_ATTRIBUTION] == DEFAULT_ATTRIBUTION)
    description = LIGHT_SWITCHES[0]
    unique_id = f'{light.id}_{description.key}'
    entity_id = f"switch.test_light_{description.name.lower().replace(' ', '_')}"
    entity = entity_registry.async_get(entity_id)
    assert entity
    assert (entity.disabled is True)
    assert (entity.unique_id == unique_id)
    (await enable_entity(hass, mock_entry.entry.entry_id, entity_id))
    state = hass.states.get(entity_id)
    assert state
    assert (state.state == STATE_OFF)
    assert (state.attributes[ATTR_ATTRIBUTION] == DEFAULT_ATTRIBUTION)