Import old energy readings for use in energy dashboard

Hi everyone,

I have recently created an add-on that uses the recorder/import_statistics route of the WebSocket API to import electric consumption data from french electric meters (AKA Linky).

Because these statistics are not tracked by a sensor, they are considered “external statistics” (there is a : instead of a . in the statistic_id)

However, it looks like I cannot add a static price to my electric consumption (the radio buttons are disabled), and this seems to be by design according to this PR comment:

A price entity or a fixed price is only supported when the consumed gas is tracked by a sensor.

Where can I find more information about this ? I cannot find any other related documentation, and I have no idea how to fix this little problem…

Thanks!