mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Coerce color_temp to int even when passed in as kelvin (#7640)
This commit is contained in:
committed by
Paulus Schoutsen
parent
a068efcd47
commit
3d4b2436db
@@ -56,10 +56,10 @@ class TestDemoLight(unittest.TestCase):
|
||||
self.assertEqual(154, state.attributes.get(light.ATTR_MIN_MIREDS))
|
||||
self.assertEqual(500, state.attributes.get(light.ATTR_MAX_MIREDS))
|
||||
self.assertEqual('none', state.attributes.get(light.ATTR_EFFECT))
|
||||
light.turn_on(self.hass, ENTITY_LIGHT, kelvin=4000, brightness_pct=50)
|
||||
light.turn_on(self.hass, ENTITY_LIGHT, kelvin=3000, brightness_pct=50)
|
||||
self.hass.block_till_done()
|
||||
state = self.hass.states.get(ENTITY_LIGHT)
|
||||
self.assertEqual(250, state.attributes.get(light.ATTR_COLOR_TEMP))
|
||||
self.assertEqual(333, state.attributes.get(light.ATTR_COLOR_TEMP))
|
||||
self.assertEqual(127, state.attributes.get(light.ATTR_BRIGHTNESS))
|
||||
|
||||
def test_turn_off(self):
|
||||
|
||||
Reference in New Issue
Block a user