Skip to content

Commit

Permalink
Merge pull request #13 from Rijswijker/new_branch
Browse files Browse the repository at this point in the history
Update API to v0.6.7, fix HA 2024.1 compatibility
  • Loading branch information
ualex73 authored May 7, 2024
2 parents c75dc90 + 9163543 commit efa7e4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions custom_components/slide/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
from goslideapi import GoSlideLocal
from homeassistant.components.cover import (
ATTR_POSITION,
DEVICE_CLASS_CURTAIN,
PLATFORM_SCHEMA,
STATE_CLOSED,
STATE_CLOSING,
STATE_OPEN,
STATE_OPENING,
CoverEntity,
CoverDeviceClass,
)
from homeassistant.const import ATTR_ID, CONF_HOST, CONF_PASSWORD
from homeassistant.helpers import config_validation as cv, entity_platform
Expand Down Expand Up @@ -57,7 +57,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
await hass.data[DOMAIN][API_LOCAL].slide_add(
config.get(CONF_HOST),
config.get(CONF_PASSWORD),
config.get(CONF_API_VERSION),
)

slide = await hass.data[DOMAIN][API_LOCAL].slide_info(config.get(CONF_HOST))
Expand Down Expand Up @@ -149,7 +148,7 @@ def assumed_state(self):
@property
def device_class(self):
"""Return the device class of the cover."""
return DEVICE_CLASS_CURTAIN
return CoverDeviceClass.CURTAIN

@property
def current_cover_position(self):
Expand Down Expand Up @@ -266,7 +265,7 @@ def assumed_state(self):
@property
def device_class(self):
"""Return the device class of the cover."""
return DEVICE_CLASS_CURTAIN
return CoverDeviceClass.CURTAIN

@property
def current_cover_position(self):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/slide/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"name": "Slide",
"version": "1.0",
"documentation": "https://www.home-assistant.io/integrations/slide",
"requirements": ["goslide-api==0.6.6"],
"requirements": ["goslide-api==0.6.7"],
"codeowners": ["@ualex73"]
}

0 comments on commit efa7e4e

Please sign in to comment.