Hi, it is possible to make a code, so when my phone is set to charge, then my bulb changes to blue. Have looked around but can not find anything
Yes that’s possible. If you have the Home Assistant app installed, it will create a binary_sensor in Home Assistant that indicates if your phone is charging. It will look something like this:
binary_sensor.samsung_xyz_is_charging
The state of that binary_sensor can be monitored by an automation using a State Trigger. When the binary_sensor changes to on
it can serve to trigger the automation and set your light to blue.
Similarly, you can have the same automation turn off the light when the phone is no longer charging.
I’ve found it now, thanks for the help