Hue mireds value is actually 153 not 154 (#13601)

This commit is contained in:
Niklas Wagner 2018-04-02 09:45:38 +02:00 committed by Daniel Høyer Iversen
parent 98e4d514a5
commit 9fb73c1bab
3 changed files with 5 additions and 3 deletions

View File

@ -457,12 +457,14 @@ class Light(ToggleEntity):
def min_mireds(self):
"""Return the coldest color_temp that this light supports."""
# Default to the Philips Hue value that HA has always assumed
return 154
# https://developers.meethue.com/documentation/core-concepts
return 153
@property
def max_mireds(self):
"""Return the warmest color_temp that this light supports."""
# Default to the Philips Hue value that HA has always assumed
# https://developers.meethue.com/documentation/core-concepts
return 500
@property

View File

@ -74,7 +74,7 @@ async def test_sync_message(hass):
'willReportState': False,
'attributes': {
'colorModel': 'rgb',
'temperatureMinK': 6493,
'temperatureMinK': 6535,
'temperatureMaxK': 2000,
},
'roomHint': 'Living Room'

View File

@ -53,7 +53,7 @@ class TestDemoLight(unittest.TestCase):
self.hass.block_till_done()
state = self.hass.states.get(ENTITY_LIGHT)
self.assertEqual(400, state.attributes.get(light.ATTR_COLOR_TEMP))
self.assertEqual(154, state.attributes.get(light.ATTR_MIN_MIREDS))
self.assertEqual(153, 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=3000, brightness_pct=50)