Use DeviceClass Enums in elgato tests (#62121)

This commit is contained in:
Dave T 2021-12-16 21:07:52 +00:00 committed by GitHub
parent 3b3ab2c19c
commit 9e4f720591
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,14 +5,10 @@ from elgato import ElgatoError
import pytest
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.const import (
ATTR_ENTITY_ID,
ATTR_ICON,
ENTITY_CATEGORY_CONFIG,
STATE_UNKNOWN,
)
from homeassistant.const import ATTR_ENTITY_ID, ATTR_ICON, STATE_UNKNOWN
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity import EntityCategory
from tests.components.elgato import init_integration
from tests.test_util.aiohttp import AiohttpClientMocker
@ -35,7 +31,7 @@ async def test_button_identify(
entry = entity_registry.async_get("button.identify")
assert entry
assert entry.unique_id == "CN11A1A00001_identify"
assert entry.entity_category == ENTITY_CATEGORY_CONFIG
assert entry.entity_category == EntityCategory.CONFIG
with patch(
"homeassistant.components.elgato.light.Elgato.identify"