From 12155cb66eebaf41e6dac547007f5a3cae7be727 Mon Sep 17 00:00:00 2001 From: tetienne Date: Fri, 29 Nov 2019 12:08:20 +0100 Subject: [PATCH] Fix somfy switch inherit from SwitchDevice instead of ToggleEntity (#29182) --- homeassistant/components/somfy/cover.py | 2 +- homeassistant/components/somfy/switch.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/somfy/cover.py b/homeassistant/components/somfy/cover.py index 3a8557ea484..12f12676f92 100644 --- a/homeassistant/components/somfy/cover.py +++ b/homeassistant/components/somfy/cover.py @@ -7,7 +7,7 @@ from homeassistant.components.cover import ( 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): diff --git a/homeassistant/components/somfy/switch.py b/homeassistant/components/somfy/switch.py index d3294954851..58ad2e5905d 100644 --- a/homeassistant/components/somfy/switch.py +++ b/homeassistant/components/somfy/switch.py @@ -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): @@ -22,7 +22,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): 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):