Use EntityCategory enum in Onewire (#60907)
* Use EntityCategory enum in Onewire * Add checks for the entity_category * Fix typo Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
0a2ca1f7d5
commit
adf2fa5664
3 changed files with 10 additions and 2 deletions
|
@ -9,8 +9,9 @@ from typing import TYPE_CHECKING, Any
|
|||
from homeassistant.components.onewire.model import OWServerDeviceDescription
|
||||
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_TYPE, ENTITY_CATEGORY_CONFIG
|
||||
from homeassistant.const import CONF_TYPE
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import (
|
||||
|
@ -62,7 +63,7 @@ DEVICE_SWITCHES: dict[str, tuple[OneWireEntityDescription, ...]] = {
|
|||
OneWireSwitchEntityDescription(
|
||||
key="IAD",
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
name="IAD",
|
||||
read_mode=READ_MODE_BOOL,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue