Cleanup EntityCategory in tests (#78808)
This commit is contained in:
parent
fe747601ff
commit
25b1dfb53a
4 changed files with 13 additions and 12 deletions
|
@ -24,12 +24,11 @@ from homeassistant.components.button import DOMAIN, SERVICE_PRESS, ButtonDeviceC
|
|||
from homeassistant.const import (
|
||||
ATTR_DEVICE_CLASS,
|
||||
ATTR_ENTITY_ID,
|
||||
ENTITY_CATEGORY_CONFIG,
|
||||
ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
STATE_UNKNOWN,
|
||||
Platform,
|
||||
)
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
|
||||
from .common import find_entity_id
|
||||
from .conftest import SIG_EP_INPUT, SIG_EP_OUTPUT, SIG_EP_TYPE
|
||||
|
@ -137,7 +136,7 @@ async def test_button(hass, contact_sensor):
|
|||
|
||||
entry = entity_registry.async_get(entity_id)
|
||||
assert entry
|
||||
assert entry.entity_category == ENTITY_CATEGORY_DIAGNOSTIC
|
||||
assert entry.entity_category == EntityCategory.DIAGNOSTIC
|
||||
|
||||
with patch(
|
||||
"zigpy.zcl.Cluster.request",
|
||||
|
@ -177,7 +176,7 @@ async def test_frost_unlock(hass, tuya_water_valve):
|
|||
|
||||
entry = entity_registry.async_get(entity_id)
|
||||
assert entry
|
||||
assert entry.entity_category == ENTITY_CATEGORY_CONFIG
|
||||
assert entry.entity_category == EntityCategory.CONFIG
|
||||
|
||||
with patch(
|
||||
"zigpy.zcl.Cluster.request",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue