Cleanup BleBox platforms (#35552)
This commit is contained in:
parent
902eb187ef
commit
312080de08
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
"""BleBox switch implementation."""
|
"""BleBox switch implementation."""
|
||||||
from homeassistant.components.switch import SwitchDevice
|
from homeassistant.components.switch import SwitchEntity
|
||||||
|
|
||||||
from . import BleBoxEntity, create_blebox_entities
|
from . import BleBoxEntity, create_blebox_entities
|
||||||
from .const import BLEBOX_TO_HASS_DEVICE_CLASSES
|
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."""
|
"""Representation of a BleBox switch feature."""
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -27,8 +27,8 @@ class BleBoxSwitchEntity(BleBoxEntity, SwitchDevice):
|
||||||
|
|
||||||
async def async_turn_on(self, **kwargs):
|
async def async_turn_on(self, **kwargs):
|
||||||
"""Turn on the switch."""
|
"""Turn on the switch."""
|
||||||
return await self._feature.async_turn_on()
|
await self._feature.async_turn_on()
|
||||||
|
|
||||||
async def async_turn_off(self, **kwargs):
|
async def async_turn_off(self, **kwargs):
|
||||||
"""Turn off the switch."""
|
"""Turn off the switch."""
|
||||||
return await self._feature.async_turn_off()
|
await self._feature.async_turn_off()
|
||||||
|
|
Loading…
Add table
Reference in a new issue