BottlecapDave / HomeAssistant-OctopusEnergy

Unofficial Home Assistant integration for interacting with Octopus Energy
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/
MIT License
568 stars 56 forks source link

Octopus erros in Logs export_current_rate (GBP/kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed #668

Closed Blackduke77 closed 7 months ago

Blackduke77 commented 8 months ago

Describe the bug

I have been noticing this error in logs

The unit of sensor.octopus_energy_electricity_xxxxx_export_current_rate (GBP/kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this The unit of sensor.octopus_energy_gas_exxxxx_current_rate (GBP/kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this

Reproduction steps

check logs

Expected behaviour

no errors in logs

Tariff Code

1900026189685

Integration Version

9.2.1

Home Assistant Version

2023.12.4

Fresh Install?

Not specified

Home Assistant Logs

''' { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.12.4", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.6", "docker": true, "arch": "aarch64", "timezone": "Europe/London", "os_name": "Linux", "os_version": "6.1.58-haos-raspi", "supervisor": "2023.12.0", "host_os": "Home Assistant OS 11.2", "docker_version": "24.0.7", "chassis": "embedded", "run_as_root": true }, "custom_components": { "octopus_energy": { "version": "9.2.1", "requirements": [] }, "myenergi": { "version": "0.0.24", "requirements": [ "pymyenergi==0.0.29" ] }, "solcast_solar": { "version": "4.0.14", "requirements": [ "aiohttp>=3.8.5", "datetime>=4.3", "isodate>=0.6.1" ] }, "hacs": { "version": "1.33.0", "requirements": [ "aiogithubapi>=22.10.1" ] } }, "integration_manifest": { "domain": "octopus_energy", "name": "Octopus Energy", "codeowners": [ "@bottlecapdave" ], "config_flow": true, "dependencies": [ "repairs", "recorder" ], "documentation": "https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy", "homekit": {}, "iot_class": "cloud_polling", "issue_tracker": "https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues", "ssdp": [], "version": "9.2.1", "zeroconf": [], "is_built_in": false }, "data": { "id": "A-40A85651", "octoplus_enrolled": true, "electricity_meter_points": [ { "mpan": "REDACTED", "meters": [ { "serial_number": "REDACTED", "is_export": false, "is_smart_meter": true, "device_id": "REDACTED", "manufacturer": "1063 - Landis and Gyr", "model": "00050202", "firmware": "38040602" } ], "agreements": [ { "start": "2023-05-22T23:00:00+00:00", "end": null, "tariff_code": "E-1R-AGILE-FLEX-22-11-25-J", "product_code": "AGILE-FLEX-22-11-25" } ] }, { "mpan": "REDACTED", "meters": [ { "serial_number": "REDACTED", "is_export": true, "is_smart_meter": true, "device_id": null, "manufacturer": "1063 - Landis and Gyr", "model": "00050202", "firmware": "38040602" } ], "agreements": [ { "start": "2023-08-18T23:00:00+00:00", "end": "2024-08-18T23:00:00+00:00", "tariff_code": "E-1R-OUTGOING-FIX-12M-19-05-13-J", "product_code": "OUTGOING-FIX-12M-19-05-13" } ] } ], "gas_meter_points": [ { "mprn": "REDACTED", "meters": [ { "serial_number": "REDACTED", "consumption_units": "m\u00b3", "is_smart_meter": true, "device_id": "REDACTED", "manufacturer": "1063 - Landis and Gyr", "model": "47720101", "firmware": "03035524" } ], "agreements": [ { "start": "2023-04-13T23:00:00+00:00", "end": null, "tariff_code": "G-1R-VAR-22-11-01-J", "product_code": "VAR-22-11-01" } ] } ] } } '''

Confirmation

BottlecapDave commented 8 months ago

Hello. You should be able to fix the issue by going to the developer statistics as mentioned in the warning. I'm not too sure what causes this as all the required data is set and static. Possibly a HA issue.

Blackduke77 commented 8 months ago

But I am not sure what it is asking me to do when I goto the developer Statistics

BottlecapDave commented 8 months ago

When you're at the statistics page, you will be presented with something like the following

Screenshot 2024-01-03 193214

You then click Fix issue next to the culprit sensors, where you can then either update the unit of measurement to the correct value or you can delete the statistics and wait for HA to try again from the start. You can probably go ahead and just update the unit of measurement.

Blackduke77 commented 8 months ago

Thank You

github-actions[bot] commented 7 months ago

This issue has become stale because it has been open for 30 days with no activity. If you still think it's an issue, please respond soon.

github-actions[bot] commented 7 months ago

This issue has been closed because it has been inactive for 14 days since being marked as stale. This is done to help keep on top of active issues. If you still think it's an issue, please respond to this issue