Goal is to be usable as a source of energy in the energy dashboard.
Starting with HA 2021.9 (still in beta), sensors will be have long term
stats and be usable in energy dashboard.
It also gives a better integration with base classes of home assistant
and decrease code in this custom component.
Change-Id: Ide1967ac181c0cf7f093cff539aae2b1cdccd9b4
Support is a bit fragile since we don't really have a serial number to
base on. However we have a reasonnable default (source prometheus +
expression) and a way for user to specify id easily if they to change
the prometheus query.
Fixlfasci/homeassistant-prometheus-query#5
Goal is to make a first pass to allow to be exposed in the energy
dashboard.
This requires usage of HA version 2021.9 (which is beta at time of
writing) if we want to allow total_increase state_class