mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Fix Hue brightness values over 127 off by one (#34190)
This commit is contained in:
@@ -222,7 +222,7 @@ async def test_lights(hass, mock_bridge):
|
||||
lamp_1 = hass.states.get("light.hue_lamp_1")
|
||||
assert lamp_1 is not None
|
||||
assert lamp_1.state == "on"
|
||||
assert lamp_1.attributes["brightness"] == 144
|
||||
assert lamp_1.attributes["brightness"] == 145
|
||||
assert lamp_1.attributes["hs_color"] == (36.067, 69.804)
|
||||
|
||||
lamp_2 = hass.states.get("light.hue_lamp_2")
|
||||
@@ -238,7 +238,7 @@ async def test_lights_color_mode(hass, mock_bridge):
|
||||
lamp_1 = hass.states.get("light.hue_lamp_1")
|
||||
assert lamp_1 is not None
|
||||
assert lamp_1.state == "on"
|
||||
assert lamp_1.attributes["brightness"] == 144
|
||||
assert lamp_1.attributes["brightness"] == 145
|
||||
assert lamp_1.attributes["hs_color"] == (36.067, 69.804)
|
||||
assert "color_temp" not in lamp_1.attributes
|
||||
|
||||
@@ -258,7 +258,7 @@ async def test_lights_color_mode(hass, mock_bridge):
|
||||
lamp_1 = hass.states.get("light.hue_lamp_1")
|
||||
assert lamp_1 is not None
|
||||
assert lamp_1.state == "on"
|
||||
assert lamp_1.attributes["brightness"] == 144
|
||||
assert lamp_1.attributes["brightness"] == 145
|
||||
assert lamp_1.attributes["color_temp"] == 467
|
||||
assert "hs_color" not in lamp_1.attributes
|
||||
|
||||
@@ -277,7 +277,7 @@ async def test_groups(hass, mock_bridge):
|
||||
lamp_1 = hass.states.get("light.group_1")
|
||||
assert lamp_1 is not None
|
||||
assert lamp_1.state == "on"
|
||||
assert lamp_1.attributes["brightness"] == 254
|
||||
assert lamp_1.attributes["brightness"] == 255
|
||||
assert lamp_1.attributes["color_temp"] == 250
|
||||
|
||||
lamp_2 = hass.states.get("light.group_2")
|
||||
@@ -328,7 +328,7 @@ async def test_new_group_discovered(hass, mock_bridge):
|
||||
new_group = hass.states.get("light.group_3")
|
||||
assert new_group is not None
|
||||
assert new_group.state == "on"
|
||||
assert new_group.attributes["brightness"] == 153
|
||||
assert new_group.attributes["brightness"] == 154
|
||||
assert new_group.attributes["color_temp"] == 250
|
||||
|
||||
|
||||
@@ -448,7 +448,7 @@ async def test_other_group_update(hass, mock_bridge):
|
||||
assert group_2 is not None
|
||||
assert group_2.name == "Group 2"
|
||||
assert group_2.state == "on"
|
||||
assert group_2.attributes["brightness"] == 153
|
||||
assert group_2.attributes["brightness"] == 154
|
||||
assert group_2.attributes["color_temp"] == 250
|
||||
|
||||
updated_group_response = dict(GROUP_RESPONSE)
|
||||
|
||||
Reference in New Issue
Block a user