Move more MQTT platforms to config entries (#16918)
* Move more MQTT platforms to config entries * Address comments
This commit is contained in:
1 parent
720b05c301
commit
af89e7c50f
15 files changed
+214
-101
No files matched your search
@@ -6,12 +6,12 @@ from homeassistant.setup import setup_component, async_setup_component
|
||||
from homeassistant.const import STATE_ON, STATE_OFF, STATE_UNAVAILABLE,\
|
||||
ATTR_ASSUMED_STATE
|
||||
import homeassistant.core as ha
|
||||
import homeassistant.components.switch as switch
|
||||
from homeassistant.components import switch, mqtt
|
||||
from homeassistant.components.mqtt.discovery import async_start
|
||||
|
||||
from tests.common import (
|
||||
mock_mqtt_component, fire_mqtt_message, get_test_home_assistant, mock_coro,
|
||||
async_mock_mqtt_component, async_fire_mqtt_message)
|
||||
async_mock_mqtt_component, async_fire_mqtt_message, MockConfigEntry)
|
||||
from tests.components.switch import common
|
||||
|
||||
|
||||
@@ -313,7 +313,8 @@ async def test_unique_id(hass):
|
||||
|
||||
async def test_discovery_removal_switch(hass, mqtt_mock, caplog):
|
||||
"""Test expansion of discovered switch."""
|
||||
await async_start(hass, 'homeassistant', {})
|
||||
entry = MockConfigEntry(domain=mqtt.DOMAIN)
|
||||
await async_start(hass, 'homeassistant', {}, entry)
|
||||
|
||||
data = (
|
||||
'{ "name": "Beer",'
|
||||
|
||||
Reference in new issue
Block a user