Skip to content

Commit

Permalink
Fix Hass 2022.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Mamontov committed Apr 6, 2022
1 parent 7940fae commit db1b6bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions custom_components/ledfx/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from homeassistant.core import HomeAssistant, callback
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.dispatcher import async_dispatcher_connect, async_dispatcher_send
from homeassistant.components.light import (
Expand All @@ -22,7 +23,6 @@
from homeassistant.components.binary_sensor import BinarySensorEntity
from homeassistant.components.sensor import SensorEntity
from homeassistant.helpers.entity import Entity
from homeassistant.const import ENTITY_CATEGORY_CONFIG, ENTITY_CATEGORY_DIAGNOSTIC

from .const import DATA_UPDATED, DOMAIN, ICONS
from .device import Device
Expand Down Expand Up @@ -174,7 +174,7 @@ def get_option(self, code: str):
class LedFxSensor(SensorEntity, LedFxEntity):
@property
def entity_category(self) -> str:
return ENTITY_CATEGORY_DIAGNOSTIC
return EntityCategory.DIAGNOSTIC

@property
def native_value(self) -> Optional[str]:
Expand All @@ -183,7 +183,7 @@ def native_value(self) -> Optional[str]:
class LedFxBinarySensor(BinarySensorEntity, LedFxEntity):
@property
def entity_category(self) -> str:
return ENTITY_CATEGORY_DIAGNOSTIC
return EntityCategory.DIAGNOSTIC

@property
def is_on(self) -> bool:
Expand All @@ -197,7 +197,7 @@ def is_on(self) -> bool:
class LedFxSelect(SelectEntity, LedFxEntity):
@property
def entity_category(self) -> str:
return ENTITY_CATEGORY_CONFIG
return EntityCategory.CONFIG

@property
def current_option(self) -> Optional[str]:
Expand Down Expand Up @@ -321,7 +321,7 @@ def extra_state_attributes(self) -> dict:

@property
def entity_category(self) -> str:
return ENTITY_CATEGORY_CONFIG
return EntityCategory.CONFIG

@property
def available(self) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ledfx/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "ledfx",
"name": "LedFx",
"version": "1.3.1",
"version": "1.4.0",
"documentation": "https://github.com/dmamontov/hass-ledfx",
"issue_tracker": "https://github.com/dmamontov/hass-ledfx/issues",
"config_flow": true,
Expand Down

0 comments on commit db1b6bc

Please sign in to comment.