mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 09:38:21 +00:00
parent
5876d6766d
commit
7991e2df5f
@ -31,7 +31,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
||||
def brightness_to_percentage(byt):
|
||||
"""Convert brightness from absolute 0..255 to percentage."""
|
||||
return (byt*100.0)/255.0
|
||||
return int((byt*100.0)/255.0)
|
||||
|
||||
|
||||
def brightness_from_percentage(percent):
|
||||
|
Loading…
x
Reference in New Issue
Block a user