At least on HA 2023.2.x the initial statistic import always fails because of the "state_unit_of_measurement" field is not allowed in StatisticMetaData.
I haven't found any documentation for this object to verify this change.
Thanks, I noticed it was already removed from the dev branch I used for development, but I still needed it on the local installation for it to not fail. Looks like they finally removed it now from production as well!
At least on HA 2023.2.x the initial statistic import always fails because of the "state_unit_of_measurement" field is not allowed in StatisticMetaData.
I haven't found any documentation for this object to verify this change.