code: def update_color_state(self, light):
          
          x, y = light.xy or (None, None)
          self.async_update({
              'state': {
                  'bri': light.brightness,
                  'hue': light.hue,
                  'sat': light.sat,
                  'ct': light.ct,
                  'x': x,
                  'y': y,
                  'colormode': light.colormode,
              },
          })
docs: Sync color state with light.