mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
await syntax knx scene (#12879)
This commit is contained in:
parent
54f8f1223f
commit
f0d9844dfb
@ -4,8 +4,6 @@ Support for KNX scenes.
|
|||||||
For more details about this platform, please refer to the documentation at
|
For more details about this platform, please refer to the documentation at
|
||||||
https://home-assistant.io/components/scene.knx/
|
https://home-assistant.io/components/scene.knx/
|
||||||
"""
|
"""
|
||||||
import asyncio
|
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.knx import ATTR_DISCOVER_DEVICES, DATA_KNX
|
from homeassistant.components.knx import ATTR_DISCOVER_DEVICES, DATA_KNX
|
||||||
@ -28,9 +26,8 @@ PLATFORM_SCHEMA = vol.Schema({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
async def async_setup_platform(hass, config, async_add_devices,
|
||||||
def async_setup_platform(hass, config, async_add_devices,
|
discovery_info=None):
|
||||||
discovery_info=None):
|
|
||||||
"""Set up the scenes for KNX platform."""
|
"""Set up the scenes for KNX platform."""
|
||||||
if discovery_info is not None:
|
if discovery_info is not None:
|
||||||
async_add_devices_discovery(hass, discovery_info, async_add_devices)
|
async_add_devices_discovery(hass, discovery_info, async_add_devices)
|
||||||
@ -73,7 +70,6 @@ class KNXScene(Scene):
|
|||||||
"""Return the name of the scene."""
|
"""Return the name of the scene."""
|
||||||
return self.scene.name
|
return self.scene.name
|
||||||
|
|
||||||
@asyncio.coroutine
|
async def async_activate(self):
|
||||||
def async_activate(self):
|
|
||||||
"""Activate the scene."""
|
"""Activate the scene."""
|
||||||
yield from self.scene.run()
|
await self.scene.run()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user