Custom light component where color mode changes need command to the light

Apologies as this may be very obvious, I just can’t find the answer and I’m trying to avoid dev only to have to start again

I am writing a custom component for a BLE controlled light (a ‘Lampster’) which has an awful companion app I need to replace

It’s a RGBWW light with various added features. I am trying to make a light entity to control it

My questions are thus:

a) you have to choose rgb or ww mode. When you change between modes the light needs a command sent to toggle its working mode. Is it possible to catch the user changing mode/tab in the light card and send a command to the light?

b) can I add extra switches to a light entity card linked to bespoke attributes of the light (for example it seems to have an “overdrive” function that boosts the brightness, which is a switch no other light I have ever seen has)

I can see all the settings of a light by reading the from the core GitHub but I’m just not sure how to extend a light easily



(very happy to copy someone else’s work if anyone has a link to a good example!!)

Ignore this post, I can’t delete it but I’ve learnt more about the light now so I’m going to create a new topic that asks a different question.