Use device class for DLink (#96567)

This commit is contained in:
Joost Lekkerkerker 2023-07-18 18:51:02 +02:00 committed by GitHub
parent cb1f365482
commit 0ca4da5592
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -28,7 +28,7 @@ async def test_switch_state(hass: HomeAssistant, mocked_plug: AsyncMock) -> None
await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
entity_id = "switch.mock_title_switch"
entity_id = "switch.mock_title"
state = hass.states.get(entity_id)
assert state.state == STATE_OFF
assert state.attributes["total_consumption"] == 1040.0
@ -62,7 +62,7 @@ async def test_switch_no_value(
await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
state = hass.states.get("switch.mock_title_switch")
state = hass.states.get("switch.mock_title")
assert state.state == STATE_OFF
assert state.attributes["total_consumption"] is None
assert state.attributes["temperature"] is None