1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Use new enums in smartthings tests (#62708)

* Use new enums in smartthings tests

* Convert == to is
This commit is contained in:
Dave T
2021-12-23 22:14:10 +00:00
committed by GitHub
parent caa2157b5b
commit 79ef4dea98
2 changed files with 5 additions and 8 deletions

View File

@@ -17,13 +17,13 @@ from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import (
ATTR_FRIENDLY_NAME,
ATTR_UNIT_OF_MEASUREMENT,
ENTITY_CATEGORY_DIAGNOSTIC,
PERCENTAGE,
STATE_UNAVAILABLE,
STATE_UNKNOWN,
)
from homeassistant.helpers import device_registry as dr, entity_registry as er
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.entity import EntityCategory
from .conftest import setup_platform
@@ -95,7 +95,7 @@ async def test_entity_and_device_attributes(hass, device_factory):
entry = entity_registry.async_get("sensor.sensor_1_battery")
assert entry
assert entry.unique_id == f"{device.device_id}.{Attribute.battery}"
assert entry.entity_category == ENTITY_CATEGORY_DIAGNOSTIC
assert entry.entity_category is EntityCategory.DIAGNOSTIC
entry = device_registry.async_get_device({(DOMAIN, device.device_id)})
assert entry
assert entry.configuration_url == "https://account.smartthings.com"