mirror of
https://github.com/home-assistant/core.git
synced 2025-07-07 21:37:07 +00:00
add_entities -> async_add_entities (#19943)
Better state handling at HA startup
This commit is contained in:
parent
4d187e08d4
commit
96d20a64d5
@ -15,13 +15,13 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(
|
||||
hass, config, add_entities, discovery_info=None):
|
||||
hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the sensors."""
|
||||
fbx = hass.data[DATA_FREEBOX]
|
||||
add_entities([
|
||||
async_add_entities([
|
||||
FbxRXSensor(fbx),
|
||||
FbxTXSensor(fbx)
|
||||
])
|
||||
], True)
|
||||
|
||||
|
||||
class FbxSensor(Entity):
|
||||
|
Loading…
x
Reference in New Issue
Block a user