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,7 +6,7 @@ from homeassistant.util.unit_system import (
|
||||
METRIC_SYSTEM
|
||||
)
|
||||
from homeassistant.setup import setup_component
|
||||
from homeassistant.components import climate
|
||||
from homeassistant.components import climate, mqtt
|
||||
from homeassistant.const import STATE_OFF, STATE_UNAVAILABLE
|
||||
from homeassistant.components.climate import (
|
||||
SUPPORT_OPERATION_MODE, SUPPORT_TARGET_TEMPERATURE,
|
||||
@@ -15,7 +15,7 @@ from homeassistant.components.climate import (
|
||||
from homeassistant.components.mqtt.discovery import async_start
|
||||
from tests.common import (get_test_home_assistant, mock_mqtt_component,
|
||||
async_fire_mqtt_message, fire_mqtt_message,
|
||||
mock_component)
|
||||
mock_component, MockConfigEntry)
|
||||
from tests.components.climate import common
|
||||
|
||||
ENTITY_CLIMATE = 'climate.test'
|
||||
@@ -656,7 +656,8 @@ class TestMQTTClimate(unittest.TestCase):
|
||||
|
||||
async def test_discovery_removal_climate(hass, mqtt_mock, caplog):
|
||||
"""Test removal of discovered climate."""
|
||||
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