mirror of
https://github.com/home-assistant/core.git
synced 2026-10-02 19:22:18 +01:00
Move MQTT platforms under the component (#20050)
* Move MQTT platforms under the component
This commit is contained in:
1 parent
5fd1053a38
commit
5b53bd6aa0
27 files changed
+6
-5
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -5,7 +5,7 @@ from unittest.mock import ANY
|
||||
|
||||
from homeassistant.components import cover, mqtt
|
||||
from homeassistant.components.cover import (ATTR_POSITION, ATTR_TILT_POSITION)
|
||||
from homeassistant.components.cover.mqtt import MqttCover
|
||||
from homeassistant.components.mqtt.cover import MqttCover
|
||||
from homeassistant.components.mqtt.discovery import async_start
|
||||
from homeassistant.const import (
|
||||
ATTR_ASSUMED_STATE, ATTR_ENTITY_ID,
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -268,7 +268,7 @@ class TestSensorMQTT(unittest.TestCase):
|
||||
assert '100' == \
|
||||
state.attributes.get('val')
|
||||
|
||||
@patch('homeassistant.components.sensor.mqtt._LOGGER')
|
||||
@patch('homeassistant.components.mqtt.sensor._LOGGER')
|
||||
def test_update_with_json_attrs_not_dict(self, mock_logger):
|
||||
"""Test attributes get extracted from a JSON result."""
|
||||
mock_component(self.hass, 'mqtt')
|
||||
@@ -289,7 +289,7 @@ class TestSensorMQTT(unittest.TestCase):
|
||||
assert state.attributes.get('val') is None
|
||||
assert mock_logger.warning.called
|
||||
|
||||
@patch('homeassistant.components.sensor.mqtt._LOGGER')
|
||||
@patch('homeassistant.components.mqtt.sensor._LOGGER')
|
||||
def test_update_with_json_attrs_bad_JSON(self, mock_logger):
|
||||
"""Test attributes get extracted from a JSON result."""
|
||||
mock_component(self.hass, 'mqtt')
|
||||
File renamed without changes.
@@ -8,8 +8,9 @@ from homeassistant.const import (
|
||||
from homeassistant.components import vacuum, mqtt
|
||||
from homeassistant.components.vacuum import (
|
||||
ATTR_BATTERY_LEVEL, ATTR_BATTERY_ICON, ATTR_STATUS,
|
||||
ATTR_FAN_SPEED, mqtt as mqttvacuum)
|
||||
from homeassistant.components.mqtt import CONF_COMMAND_TOPIC
|
||||
ATTR_FAN_SPEED)
|
||||
from homeassistant.components.mqtt import (
|
||||
CONF_COMMAND_TOPIC, vacuum as mqttvacuum)
|
||||
from homeassistant.components.mqtt.discovery import async_start
|
||||
from tests.common import (
|
||||
async_mock_mqtt_component,
|
||||
Reference in new issue
Block a user