I want to control the power draw of my dimmable light brightness in HomeAssistant (possibly indirectly via a power controller), based real-time energy costs (like with Amber Energy in Australia) and a user defined utility curve input with a widget like this – https://jsfiddle.net/1yv0kx7L/. Does anything like this already exist? If not, do you think it would be challenging to port this into integration providing a lovelace card / widget - or however it works?
I had a crack at writing an integration for this – GitHub - sgpinkus/ha_flex2: HomeAssistant integration that transforms a price sensor into [0,1] range via a quadratic dis-utility curve · GitHub. Still just a proof of concept.