Make platform setup a coroutine (#22620)
* make setup_platform a coroutine * Update homeassistant/components/tellduslive/sensor.py Co-Authored-By: fredrike <fredrik.e@gmail.com>
This commit is contained in:
parent
1e96d69688
commit
0056fcf904
8 changed files with 16 additions and 8 deletions
|
@ -53,7 +53,8 @@ HA_ATTR_TO_DAIKIN = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
async def async_setup_platform(
|
||||||
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Old way of setting up the Daikin HVAC platform.
|
"""Old way of setting up the Daikin HVAC platform.
|
||||||
|
|
||||||
Can only be called when a user accidentally mentions the platform in their
|
Can only be called when a user accidentally mentions the platform in their
|
||||||
|
|
|
@ -13,7 +13,8 @@ from .const import (
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
async def async_setup_platform(
|
||||||
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Old way of setting up the Daikin sensors.
|
"""Old way of setting up the Daikin sensors.
|
||||||
|
|
||||||
Can only be called when a user accidentally mentions the platform in their
|
Can only be called when a user accidentally mentions the platform in their
|
||||||
|
|
|
@ -10,7 +10,8 @@ _LOGGER = logging.getLogger(__name__)
|
||||||
ZONE_ICON = 'mdi:home-circle'
|
ZONE_ICON = 'mdi:home-circle'
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
async def async_setup_platform(
|
||||||
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Old way of setting up the platform.
|
"""Old way of setting up the platform.
|
||||||
|
|
||||||
Can only be called when a user accidentally mentions the platform in their
|
Can only be called when a user accidentally mentions the platform in their
|
||||||
|
|
|
@ -10,7 +10,8 @@ from .entry import TelldusLiveEntity
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
async def async_setup_platform(
|
||||||
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Old way of setting up TelldusLive.
|
"""Old way of setting up TelldusLive.
|
||||||
|
|
||||||
Can only be called when a user accidentally mentions the platform in their
|
Can only be called when a user accidentally mentions the platform in their
|
||||||
|
|
|
@ -10,7 +10,8 @@ from .entry import TelldusLiveEntity
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
async def async_setup_platform(
|
||||||
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Old way of setting up TelldusLive.
|
"""Old way of setting up TelldusLive.
|
||||||
|
|
||||||
Can only be called when a user accidentally mentions the platform in their
|
Can only be called when a user accidentally mentions the platform in their
|
||||||
|
|
|
@ -11,7 +11,8 @@ from .entry import TelldusLiveEntity
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
async def async_setup_platform(
|
||||||
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Old way of setting up TelldusLive.
|
"""Old way of setting up TelldusLive.
|
||||||
|
|
||||||
Can only be called when a user accidentally mentions the platform in their
|
Can only be called when a user accidentally mentions the platform in their
|
||||||
|
|
|
@ -42,7 +42,8 @@ SENSOR_TYPES = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
async def async_setup_platform(
|
||||||
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Old way of setting up TelldusLive.
|
"""Old way of setting up TelldusLive.
|
||||||
|
|
||||||
Can only be called when a user accidentally mentions the platform in their
|
Can only be called when a user accidentally mentions the platform in their
|
||||||
|
|
|
@ -10,7 +10,8 @@ from .entry import TelldusLiveEntity
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
async def async_setup_platform(
|
||||||
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Old way of setting up TelldusLive.
|
"""Old way of setting up TelldusLive.
|
||||||
|
|
||||||
Can only be called when a user accidentally mentions the platform in their
|
Can only be called when a user accidentally mentions the platform in their
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue