Bootstrap / Component setup async (#6264)
* Bootstrap / Entiy setup async * Cleanup add_job stuff / return task/future object * Address paulus comments / part 1 * fix install pip * Cleanup bootstrap / move config stuff to config.py * Make demo async * Further bootstrap improvement * Address Martin's comments * Fix initial tests * Fix final tests * Fix bug with prepare loader * Remove no longer needed things * Log error when invalid config * More cleanup * Cleanups platform events & fix lint * Use a non blocking add_entities callback for platform * Fix Autoamtion is setup befor entity is ready * Better automation fix * Address paulus comments * Typo * fix lint * rename functions * fix tests * fix test * change exceptions * fix spell
This commit is contained in:
parent
383b0914b3
commit
41f558b181
109 changed files with 764 additions and 848 deletions
|
@ -3,10 +3,10 @@ import unittest
|
|||
|
||||
from homeassistant.bootstrap import setup_component
|
||||
import homeassistant.components.binary_sensor as binary_sensor
|
||||
from tests.common import mock_mqtt_component, fire_mqtt_message
|
||||
from homeassistant.const import (STATE_OFF, STATE_ON)
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
from tests.common import (
|
||||
get_test_home_assistant, mock_mqtt_component, fire_mqtt_message)
|
||||
|
||||
|
||||
class TestSensorMQTT(unittest.TestCase):
|
||||
|
@ -23,7 +23,6 @@ class TestSensorMQTT(unittest.TestCase):
|
|||
|
||||
def test_setting_sensor_value_via_mqtt_message(self):
|
||||
"""Test the setting of the value via MQTT."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
assert setup_component(self.hass, binary_sensor.DOMAIN, {
|
||||
binary_sensor.DOMAIN: {
|
||||
'platform': 'mqtt',
|
||||
|
@ -49,7 +48,6 @@ class TestSensorMQTT(unittest.TestCase):
|
|||
|
||||
def test_valid_device_class(self):
|
||||
"""Test the setting of a valid sensor class."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
assert setup_component(self.hass, binary_sensor.DOMAIN, {
|
||||
binary_sensor.DOMAIN: {
|
||||
'platform': 'mqtt',
|
||||
|
@ -64,7 +62,6 @@ class TestSensorMQTT(unittest.TestCase):
|
|||
|
||||
def test_invalid_device_class(self):
|
||||
"""Test the setting of an invalid sensor class."""
|
||||
self.hass.config.components = set(['mqtt'])
|
||||
assert setup_component(self.hass, binary_sensor.DOMAIN, {
|
||||
binary_sensor.DOMAIN: {
|
||||
'platform': 'mqtt',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue