Calculate device energy costs using dynamic electricity price like Nordpool

I did a separate topic for the custom integration: Dynamic Energy Cost