Skip to content

Commit

Permalink
Temporary bugfix for AwningValance (until this is fixed serverside) (#…
Browse files Browse the repository at this point in the history
…511)

* Temporary bugfix for #486

* Add note
  • Loading branch information
iMicknl committed Aug 10, 2021
1 parent 162a839 commit da5b26e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 4 additions & 2 deletions custom_components/tahoma/cover.py
Expand Up @@ -25,16 +25,18 @@ async def async_setup_entry(
data = hass.data[DOMAIN][entry.entry_id]
coordinator = data["coordinator"]

# Includes fix for #486, which is waiting on Somfy back-end deployment
# Remove when DeploymentState will be returned for AwningValance
entities = [
Awning(device.deviceurl, coordinator)
for device in data["platforms"].get(COVER)
if device.ui_class == "Awning"
if device.ui_class == "Awning" and device.widget != "AwningValance"
]

entities += [
VerticalCover(device.deviceurl, coordinator)
for device in data["platforms"].get(COVER)
if device.ui_class != "Awning"
if device.ui_class != "Awning" or device.widget == "AwningValance"
]

async_add_entities(entities)
Expand Down
5 changes: 1 addition & 4 deletions custom_components/tahoma/cover_devices/awning.py
Expand Up @@ -8,10 +8,7 @@
SUPPORT_STOP,
)

from custom_components.tahoma.cover_devices.tahoma_cover import (
COMMANDS_STOP,
TahomaGenericCover,
)
from .tahoma_cover import COMMANDS_STOP, TahomaGenericCover

COMMAND_DEPLOY = "deploy"
COMMAND_SET_DEPLOYMENT = "setDeployment"
Expand Down
5 changes: 1 addition & 4 deletions custom_components/tahoma/cover_devices/vertical_cover.py
Expand Up @@ -14,10 +14,7 @@
SUPPORT_STOP,
)

from custom_components.tahoma.cover_devices.tahoma_cover import (
COMMANDS_STOP,
TahomaGenericCover,
)
from .tahoma_cover import COMMANDS_STOP, TahomaGenericCover

COMMAND_CYCLE = "cycle"
COMMAND_CLOSE = "close"
Expand Down

0 comments on commit da5b26e

Please sign in to comment.