def update(self) -> None:
    'Update properties from the bulb.'
    import yeelight
    try:
        self._bulb.get_properties()
        if (self._bulb_device.bulb_type == yeelight.BulbType.Color):
            self._supported_features = SUPPORT_YEELIGHT_RGB
        self._is_on = (self._properties.get('power') == 'on')
        bright = self._properties.get('bright', None)
        if bright:
            self._brightness = round((255 * (int(bright) / 100)))
        temp_in_k = self._properties.get('ct', None)
        if temp_in_k:
            self._color_temp = kelvin_to_mired(int(temp_in_k))
        self._hs = self._get_hs_from_properties()
        self._available = True
    except yeelight.BulbException as ex:
        if self._available:
            _LOGGER.error('Unable to update bulb status: %s', ex)
        self._available = False
Update properties from the bulb.
def update(self) -> None:
    
    import yeelight
    try:
        self._bulb.get_properties()
        if (self._bulb_device.bulb_type == yeelight.BulbType.Color):
            self._supported_features = SUPPORT_YEELIGHT_RGB
        self._is_on = (self._properties.get('power') == 'on')
        bright = self._properties.get('bright', None)
        if bright:
            self._brightness = round((255 * (int(bright) / 100)))
        temp_in_k = self._properties.get('ct', None)
        if temp_in_k:
            self._color_temp = kelvin_to_mired(int(temp_in_k))
        self._hs = self._get_hs_from_properties()
        self._available = True
    except yeelight.BulbException as ex:
        if self._available:
            _LOGGER.error('Unable to update bulb status: %s', ex)
        self._available = False