def _to_hass_brightness(brightness):
 return int((brightness * 255))

def _to_hass_brightness ( brightness ) : return int ( ( brightness * 255 ) )
convert percentage to home assistant brightness units .