@@ -84,6 +84,7 @@ async def test_entity_state(hass, light_devices):
84
84
state .attributes [ATTR_SUPPORTED_FEATURES ]
85
85
== SUPPORT_BRIGHTNESS | SUPPORT_TRANSITION
86
86
)
87
+ assert isinstance (state .attributes [ATTR_BRIGHTNESS ], int )
87
88
assert state .attributes [ATTR_BRIGHTNESS ] == 255
88
89
89
90
# Color Dimmer 1
@@ -103,6 +104,7 @@ async def test_entity_state(hass, light_devices):
103
104
)
104
105
assert state .attributes [ATTR_BRIGHTNESS ] == 255
105
106
assert state .attributes [ATTR_HS_COLOR ] == (273.6 , 55.0 )
107
+ assert isinstance (state .attributes [ATTR_COLOR_TEMP ], int )
106
108
assert state .attributes [ATTR_COLOR_TEMP ] == 222
107
109
108
110
@@ -191,7 +193,7 @@ async def test_turn_on_with_brightness(hass, light_devices):
191
193
assert state is not None
192
194
assert state .state == "on"
193
195
# round-trip rounding error (expected)
194
- assert state .attributes [ATTR_BRIGHTNESS ] == 73.95
196
+ assert state .attributes [ATTR_BRIGHTNESS ] == 74
195
197
196
198
197
199
async def test_turn_on_with_minimal_brightness (hass , light_devices ):
@@ -216,7 +218,7 @@ async def test_turn_on_with_minimal_brightness(hass, light_devices):
216
218
assert state is not None
217
219
assert state .state == "on"
218
220
# round-trip rounding error (expected)
219
- assert state .attributes [ATTR_BRIGHTNESS ] == 2.55
221
+ assert state .attributes [ATTR_BRIGHTNESS ] == 3
220
222
221
223
222
224
async def test_turn_on_with_color (hass , light_devices ):
0 commit comments