Fix somfy switch inherit from SwitchDevice instead of ToggleEntity (#29182)

pull/29213/head
tetienne 2019-11-29 12:08:20 +01:00 committed by Martin Hjelmare
parent 6126d05935
commit 12155cb66e
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ from homeassistant.components.cover import (
ATTR_POSITION, ATTR_POSITION,
ATTR_TILT_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): async def async_setup_entry(hass, config_entry, async_add_entities):

View File

@ -2,8 +2,8 @@
from pymfy.api.devices.camera_protect import CameraProtect from pymfy.api.devices.camera_protect import CameraProtect
from pymfy.api.devices.category import Category from pymfy.api.devices.category import Category
from homeassistant.components.somfy import DOMAIN, SomfyEntity, DEVICES, API from homeassistant.components.switch import SwitchDevice
from homeassistant.helpers.entity import ToggleEntity from . import DOMAIN, SomfyEntity, DEVICES, API
async def async_setup_entry(hass, config_entry, async_add_entities): 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) 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.""" """Representation of a Somfy Camera Shutter device."""
def __init__(self, device, api): def __init__(self, device, api):