add_entities -> async_add_entities (#19943)
Better state handling at HA startup
This commit is contained in:
parent
4d187e08d4
commit
96d20a64d5
1 changed files with 3 additions and 3 deletions
|
@ -15,13 +15,13 @@ _LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_platform(
|
async def async_setup_platform(
|
||||||
hass, config, add_entities, discovery_info=None):
|
hass, config, async_add_entities, discovery_info=None):
|
||||||
"""Set up the sensors."""
|
"""Set up the sensors."""
|
||||||
fbx = hass.data[DATA_FREEBOX]
|
fbx = hass.data[DATA_FREEBOX]
|
||||||
add_entities([
|
async_add_entities([
|
||||||
FbxRXSensor(fbx),
|
FbxRXSensor(fbx),
|
||||||
FbxTXSensor(fbx)
|
FbxTXSensor(fbx)
|
||||||
])
|
], True)
|
||||||
|
|
||||||
|
|
||||||
class FbxSensor(Entity):
|
class FbxSensor(Entity):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue