<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_color_state(self, light):
 """Sync color state with 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,
            },
        })