'Update internal properties based on zwave values.'

def update_properties(self):

    super().update_properties()
    if (self.values.color is None):
        return
    if (self.values.color_channels is None):
        return
    self._color_channels = self.values.color_channels.data
    data = self.values.color.data
    self._rgb = [int(data[1:3], 16), int(data[3:5], 16), int(data[5:7], 16)]
    index = 7
    if (self._color_channels & COLOR_CHANNEL_WARM_WHITE):
        warm_white = int(data[index:(index + 2)], 16)
        index += 2
    else:
        warm_white = 0
    if (self._color_channels & COLOR_CHANNEL_COLD_WHITE):
        cold_white = int(data[index:(index + 2)], 16)
        index += 2
    else:
        cold_white = 0
    if self._zw098:
        if (warm_white > 0):
            self._ct = TEMP_WARM_HASS
            self._rgb = ct_to_rgb(self._ct)
        elif (cold_white > 0):
            self._ct = TEMP_COLD_HASS
            self._rgb = ct_to_rgb(self._ct)
        else:
            self._ct = TEMP_MID_HASS
    elif (self._color_channels & COLOR_CHANNEL_WARM_WHITE):
        self._rgb = list(color_rgbw_to_rgb(w=warm_white, *self._rgb))
    elif (self._color_channels & COLOR_CHANNEL_COLD_WHITE):
        self._rgb = list(color_rgbw_to_rgb(w=cold_white, *self._rgb))
    if (not ((self._color_channels & COLOR_CHANNEL_RED) or (self._color_channels & COLOR_CHANNEL_GREEN) or (self._color_channels & COLOR_CHANNEL_BLUE))):
        self._rgb = None
