Cleanup BleBox platforms (#35552)

This commit is contained in:
gadgetmobile 2020-05-18 01:56:49 +02:00 committed by GitHub
parent 902eb187ef
commit 312080de08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
"""BleBox switch implementation."""
from homeassistant.components.switch import SwitchDevice
from homeassistant.components.switch import SwitchEntity
from . import BleBoxEntity, create_blebox_entities
from .const import BLEBOX_TO_HASS_DEVICE_CLASSES
@ -12,7 +12,7 @@ async def async_setup_entry(hass, config_entry, async_add):
)
class BleBoxSwitchEntity(BleBoxEntity, SwitchDevice):
class BleBoxSwitchEntity(BleBoxEntity, SwitchEntity):
"""Representation of a BleBox switch feature."""
@property
@ -27,8 +27,8 @@ class BleBoxSwitchEntity(BleBoxEntity, SwitchDevice):
async def async_turn_on(self, **kwargs):
"""Turn on the switch."""
return await self._feature.async_turn_on()
await self._feature.async_turn_on()
async def async_turn_off(self, **kwargs):
"""Turn off the switch."""
return await self._feature.async_turn_off()
await self._feature.async_turn_off()