Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix somfy switch inherit from SwitchDevice instead of ToggleEntity #29182

Merged
merged 1 commit into from Nov 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/somfy/cover.py
Expand Up @@ -7,7 +7,7 @@
ATTR_POSITION,
ATTR_TILT_POSITION,
)
from homeassistant.components.somfy import DOMAIN, SomfyEntity, DEVICES, API
from . import DOMAIN, SomfyEntity, DEVICES, API


async def async_setup_entry(hass, config_entry, async_add_entities):
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/somfy/switch.py
Expand Up @@ -2,8 +2,8 @@
from pymfy.api.devices.camera_protect import CameraProtect
from pymfy.api.devices.category import Category

from homeassistant.components.somfy import DOMAIN, SomfyEntity, DEVICES, API
from homeassistant.helpers.entity import ToggleEntity
from homeassistant.components.switch import SwitchDevice
from . import DOMAIN, SomfyEntity, DEVICES, API


async def async_setup_entry(hass, config_entry, async_add_entities):
Expand All @@ -22,7 +22,7 @@ def get_shutters():
async_add_entities(await hass.async_add_executor_job(get_shutters), True)


class SomfyCameraShutter(SomfyEntity, ToggleEntity):
class SomfyCameraShutter(SomfyEntity, SwitchDevice):
"""Representation of a Somfy Camera Shutter device."""

def __init__(self, device, api):
Expand Down