I just came across this thread.
@astone great idea and nice app!
I have made some changes on my side:
- Faster color extraction (using Pillow directly). On my Raspberry Pi, it is about 8x faster!
- Extract a color palette instead, that matches the number of lights added in the config
- An optional entity state check condition
Also, @easwaran83, if you still need help for that, I’ve made a README wich explains what I did to set this up.
The code can be found here: https://github.com/ericmatte/HomeAutomation/tree/master/appdaemon
Cheers!