mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Config validation for MQTT
This commit is contained in:
@@ -4,6 +4,7 @@ from datetime import timedelta
|
||||
from unittest import mock
|
||||
|
||||
from homeassistant import core as ha, loader
|
||||
from homeassistant.bootstrap import _setup_component
|
||||
from homeassistant.helpers.entity import ToggleEntity
|
||||
from homeassistant.const import (
|
||||
STATE_ON, STATE_OFF, DEVICE_DEFAULT_NAME, EVENT_TIME_CHANGED,
|
||||
@@ -123,7 +124,7 @@ def mock_http_component(hass):
|
||||
@mock.patch('homeassistant.components.mqtt.MQTT')
|
||||
def mock_mqtt_component(hass, mock_mqtt):
|
||||
"""Mock the MQTT component."""
|
||||
mqtt.setup(hass, {
|
||||
_setup_component(hass, mqtt.DOMAIN, {
|
||||
mqtt.DOMAIN: {
|
||||
mqtt.CONF_BROKER: 'mock-broker',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user