Fix callback and async (#31281)

* Fix callback and async

* Fix a return

* Fix test

* Fix mqtt tests

* Fix some more callbacks
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-01-29 13:59:45 -08:00
1 parent ee602e40a6
commit e9e44dbd97
90 files changed
+627 -883

No files matched your search

@@ -13,6 +13,7 @@ from homeassistant.components.device_tracker import (
)
from homeassistant.components.device_tracker.config_entry import ScannerEntity
from homeassistant.const import CONF_URL
from homeassistant.core import callback
from homeassistant.helpers import entity_registry
from homeassistant.helpers.dispatcher import async_dispatcher_connect
@@ -70,6 +71,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_new_entities(hass, router.url, async_add_entities, tracked)
@callback
def async_add_new_entities(hass, router_url, async_add_entities, tracked):
"""Add new entities that are not already being tracked."""
router = hass.data[DOMAIN].routers[router_url]