mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
fix pep8 errors and typos in tests.
This commit is contained in:
@@ -211,7 +211,6 @@ class MqttLight(Light):
|
||||
def color_temp(self):
|
||||
return self._color_temp
|
||||
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
"""No polling needed for a MQTT light."""
|
||||
|
@@ -186,9 +186,9 @@ class TestLightMQTT(unittest.TestCase):
|
||||
self.assertEqual(100,
|
||||
light_state.attributes['brightness'])
|
||||
|
||||
fire_mqtt_message(self.hass, 'test_lgith_rgb/color_temp/status', '300')
|
||||
fire_mqtt_message(self.hass, 'test_light_rgb/color_temp/status', '300')
|
||||
self.hass.block_till_done()
|
||||
light_state = self.hass.states.get('light-test')
|
||||
light_state = self.hass.states.get('light.test')
|
||||
self.hass.block_till_done()
|
||||
self.assertEqual(300, light_state.attributes['color_temp'])
|
||||
|
||||
@@ -260,6 +260,7 @@ class TestLightMQTT(unittest.TestCase):
|
||||
'state_topic': 'test_light_rgb/status',
|
||||
'command_topic': 'test_light_rgb/set',
|
||||
'brightness_state_topic': 'test_light_rgb/brightness/status',
|
||||
'color_temp_state_topic': 'test_light_rgb/color_temp/status',
|
||||
'rgb_state_topic': 'test_light_rgb/rgb/status',
|
||||
'state_value_template': '{{ value_json.hello }}',
|
||||
'brightness_value_template': '{{ value_json.hello }}',
|
||||
@@ -280,7 +281,7 @@ class TestLightMQTT(unittest.TestCase):
|
||||
fire_mqtt_message(self.hass, 'test_light_rgb/brightness/status',
|
||||
'{"hello": "50"}')
|
||||
fire_mqtt_message(self.hass, 'test_light_rgb/color_temp/status',
|
||||
'{"hello": "300}')
|
||||
'{"hello": "300"}')
|
||||
self.hass.block_till_done()
|
||||
|
||||
state = self.hass.states.get('light.test')
|
||||
|
Reference in New Issue
Block a user