'Turn the light source on or sets a specific dimmer value.'

def turn_on(self, **kwargs):

    brightness = kwargs.get(ATTR_BRIGHTNESS)
    if (brightness is not None):
        self._brightness = brightness
    bval = math.floor(((self._brightness / 256.0) * 100.0))
    if (bval == 0):
        bval = 1
    command = [165, 2, bval, 1, 9]
    command.extend(self._sender_id)
    command.extend([0])
    self.send_command(command, [], 1)
    self._on_state = True
