Track colour temperature of Collingwood H2 Lite 500 CSW with Candeo C202

Hello, Home Assistant newbie here.

I have a room with these downlights: Collingwood H2 Lite 500 CSW DLT470BS6500.

They are not “smart”: no Zigbee/BLE/WiFi/Z-Wave/KNX/X10 or other network connectivity. But they are dimmable in the manner of traditional light bulbs. And their colour temperature can be switched from 3000K to 4000K to 6500K and back to 3000K, respectively, by switching them off and immediately switching them on again.

I now wish to control & monitor them with Home Assistant.

To make a start, I replaced the original dumb wall switch with a Candeo C202 wall-mounted dimmer switch connected via a Zigbee USB dongle to a Raspberry Pi running Home Assistant. So far, so good. Home Assistant lets me see & set the brightness & on/off state of the C202 & therefore of the downlights.

But of course the C202 has no knowledge of the lights’ colour temperature.

My guess for how best to store the colour temperature in Home Assistant is something like:

  • Make a “helper” of type “counter”, with a range of 0-2. Then consider 0 = 3000K, 1 = 4000K, 2 = 6500K.

  • Somehow increment this counter each time the C202 is turned off and then on again within 2 seconds.

Is this a good approach, and if so how should I attempt the latter part? (I have learned how to trigger an automation to run when the C202 is switched to off, but I don’t yet know how to trigger one when it is switched on again within 2 seconds.)