Skip to content

Commit

Permalink
🔧 fix for hass old version
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Aug 12, 2023
1 parent 84904b5 commit 3ba5b99
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/xiaomi_miot/core/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from .device_customizes import DEVICE_CUSTOMIZES # noqa
from .miot_local_devices import MIOT_LOCAL_MODELS # noqa
from .translation_languages import TRANSLATION_LANGUAGES # noqa
from homeassistant.util.json import JsonObjectType

DOMAIN = 'xiaomi_miot'
DEFAULT_NAME = 'Xiaomi Miot'
Expand Down Expand Up @@ -84,6 +83,12 @@ class EntityCategory(Enum):
except (ModuleNotFoundError, ImportError):
DOMAIN_TEXT = None

try:
# hass 2023.3
from homeassistant.util.json import JsonObjectType
except (ModuleNotFoundError, ImportError):
JsonObjectType = dict

try:
# hass 2023.7
from homeassistant.core import ServiceResponse, SupportsResponse
Expand Down

1 comment on commit 3ba5b99

@al-one
Copy link
Owner Author

@al-one al-one commented on 3ba5b99 Aug 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.