Skip to content

Commit

Permalink
1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
hakana committed Jan 19, 2025
1 parent 3cb2128 commit 893c52b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions custom_components/shelly/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
"""

#pylint: disable=import-error
from homeassistant.components.cover import (ATTR_POSITION,
SUPPORT_CLOSE,
SUPPORT_OPEN, SUPPORT_STOP,
SUPPORT_SET_POSITION)
from homeassistant.components.cover import ATTR_POSITION
try:
from homeassistant.components.cover import \
(SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_STOP, SUPPORT_SET_POSITION)
except:
from homeassistant.components.cover import (CoverEntityFeature)
SUPPORT_CLOSE = CoverEntityFeature.CLOSE
SUPPORT_OPEN = CoverEntityFeature.OPEN
SUPPORT_STOP = CoverEntityFeature.STOP
SUPPORT_SET_POSITION = CoverEntityFeature.SET_POSITION

try:
from homeassistant.components.cover import CoverEntity
Expand Down

0 comments on commit 893c52b

Please sign in to comment.