Reduce loss of precision when setting light percent brightness (#34208)

* Reduce loss of precision when setting light percent brightness

This part of an effort to fix all the round trip light
brightness percentages that cause errors with homekit
, alexa, and other devices that use percentage.

* fix demo light test
This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-04-14 13:26:18 -05:00
1 parent 18478ebd05
commit e0a7ea52fd
3 files changed
+56 -4

No files matched your search

+1 -1
View File
@@ -85,7 +85,7 @@ async def test_state_attributes(hass):
state = hass.states.get(ENTITY_LIGHT)
assert state.attributes.get(ATTR_COLOR_TEMP) == 333
assert state.attributes.get(ATTR_BRIGHTNESS) == 127
assert state.attributes.get(ATTR_BRIGHTNESS) == 128
async def test_turn_off(hass):