Use new enums in nanoleaf (#61938)

This commit is contained in:
epenet 2021-12-16 23:03:37 +01:00 committed by GitHub
parent e20029d87f
commit 61cdc04f3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,8 +4,8 @@ from aionanoleaf import Nanoleaf
from homeassistant.components.button import ButtonEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ENTITY_CATEGORY_CONFIG
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import NanoleafEntryData
@ -30,7 +30,7 @@ class NanoleafIdentifyButton(NanoleafEntity, ButtonEntity):
self._attr_unique_id = f"{nanoleaf.serial_no}_identify"
self._attr_name = f"Identify {nanoleaf.name}"
self._attr_icon = "mdi:magnify"
self._attr_entity_category = ENTITY_CATEGORY_CONFIG
self._attr_entity_category = EntityCategory.CONFIG
async def async_press(self) -> None:
"""Identify the Nanoleaf."""