Custom component using HistorySensor to create a history Energy sensor based on Energiinfo API which is used by several Energy companies in Sweden such as BTEA and Kils Energi.
Standard API url for BTEA is https://api4.energiinfo.se but it easiest to see the API url and the Site ID by enabling the developer mode on your browser when logging in and review the API call for login there.
After successful installation via HACS you now add your own Energiinfo sensor which will start collecting Energy data and create historical statistics based on how many days back you choose.
[!NOTE] If days back is > 90 DAYS it will start collecting in chunks of 90 days every minute until todays date is met. Once this condition is met it will update every 2 hours.
[!NOTE] This is an historical sensor it is not meant for current Energy data, as this is not currently provided by the API.