From 5e25df91b232798cb43a08cc9baa27edfa0b286e Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Wed, 22 Dec 2021 04:43:33 -0500 Subject: [PATCH] Use platform enums in utility_meter tests (#62553) --- tests/components/utility_meter/test_init.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/components/utility_meter/test_init.py b/tests/components/utility_meter/test_init.py index aa6de34f611..61e6fc4dae8 100644 --- a/tests/components/utility_meter/test_init.py +++ b/tests/components/utility_meter/test_init.py @@ -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)