Starting with this build, we are introducing the Power Grid Forecast API. This API empowers app developers to optimize app behavior, minimizing environmental impact by shifting background tasks to times when more renewable energy is available in the local electrical grid.
— Announcing Windows 11 Insider Preview Build 26052 (via Terence Eden)
Guilherme, Paulo and I submitted a proposal of a similar service (but for server workloads, where it makes more sense) back in 2020 for an EDP competition. It was not fancy enough as it was mostly transparent (the API was a job queue).
Our team is working on making energy usage first-class in programming languages, so developers have a better understanding of their impact when making design decisions.