async def async_turn_on(self, **kwargs):
    'Turn the device on.'
    brightness = kwargs.get(ATTR_BRIGHTNESS)
    self._state = True
    if (brightness is None):
        (await self._async_send(self._device.send_on))
        self._brightness = 255
    else:
        (await self._async_send(self._device.send_dim, ((brightness * 100) // 255)))
        self._brightness = brightness
    self.async_write_ha_state()
Turn the device on.
async def async_turn_on(self, **kwargs):
    
    brightness = kwargs.get(ATTR_BRIGHTNESS)
    self._state = True
    if (brightness is None):
        (await self._async_send(self._device.send_on))
        self._brightness = 255
    else:
        (await self._async_send(self._device.send_dim, ((brightness * 100) // 255)))
        self._brightness = brightness
    self.async_write_ha_state()