Use platform enums in utility_meter tests (#62553)
This commit is contained in:
parent
563e6b3e80
commit
5e25df91b2
1 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,6 @@
|
|||
from datetime import timedelta
|
||||
from unittest.mock import patch
|
||||
|
||||
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
||||
from homeassistant.components.utility_meter.const import (
|
||||
ATTR_TARIFF,
|
||||
DOMAIN,
|
||||
|
@ -17,6 +16,7 @@ from homeassistant.const import (
|
|||
CONF_PLATFORM,
|
||||
ENERGY_KILO_WATT_HOUR,
|
||||
EVENT_HOMEASSISTANT_START,
|
||||
Platform,
|
||||
)
|
||||
from homeassistant.core import State
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
@ -46,7 +46,7 @@ async def test_restore_state(hass):
|
|||
)
|
||||
|
||||
assert await async_setup_component(hass, DOMAIN, config)
|
||||
assert await async_setup_component(hass, SENSOR_DOMAIN, config)
|
||||
assert await async_setup_component(hass, Platform.SENSOR, config)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
# restore from cache
|
||||
|
@ -67,7 +67,7 @@ async def test_services(hass):
|
|||
}
|
||||
|
||||
assert await async_setup_component(hass, DOMAIN, config)
|
||||
assert await async_setup_component(hass, SENSOR_DOMAIN, config)
|
||||
assert await async_setup_component(hass, Platform.SENSOR, config)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
hass.bus.async_fire(EVENT_HOMEASSISTANT_START)
|
||||
|
|
Loading…
Add table
Reference in a new issue