BottlecapDave / HomeAssistant-OctopusEnergy

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

Export Meter Export = False #763

Closed JonathanLew1s closed 7 months ago

JonathanLew1s commented 7 months ago

Describe the bug

Looks like a logic change on Wednesday that results in the export meter not being identified as Export. Resulting in change of entity name and breaking functionality with predbat, charts etc.

Entity state shows export false yet, meter diagnostics show export true

Downgraded, Reinstalled and issue persists.

state_class: total
mpan: "*"
serial_number: *
is_export: false
is_smart_meter: true
tariff: E-1R-OUTGOING-FIX-12M-19-05-13-K
start: "2024-02-15T00:00:00+00:00"
end: "2024-02-18T00:00:00+00:00"
is_capped: false
is_intelligent_adjusted: false
current_day_min_rate: 0.15
current_day_max_rate: 0.15
current_day_average_rate: 0.15
data_last_retrieved: "2024-02-16T11:15:04.296465+00:00"
last_evaluated: "2024-02-16T11:21:05.295703+00:00"
unit_of_measurement: GBP/kWh
device_class: monetary
icon: mdi:currency-gbp
friendly_name: Electricity * * Current Rate
      {
        "mpan": "**REDACTED**",
        "meters": [
          {
            "serial_number": "**REDACTED**",
            "is_export": true,
            "is_smart_meter": true,
            "device_id": null,
            "manufacturer": "1031 - Secure Meters UK",
            "model": "C0A10101",
            "firmware": "C0A10003"
          }
        ],
        "agreements": [
          {
            "start": "2023-09-15T23:00:00+00:00",
            "end": "2024-09-27T23:00:00+00:00",
            "tariff_code": "E-1R-OUTGOING-FIX-12M-19-05-13-K",
            "product_code": "OUTGOING-FIX-12M-19-05-13"
          }
        ]
      }
    ],

Reproduction steps

Unknown

Expected behaviour

Export should = true for this meter.

Tariff Code

E-1R-OUTGOING-FIX-12M-19-05-13-K

Integration Version

10.1.0.0

Home Assistant Version

2024.2.1

Fresh Install?

Fresh install

Home Assistant Logs

octopus_energy-3cfd8806799471721dbb8262c6a35af2-Electricity Meter-458b6beb29f3cacf97d5ea65ff04ca3d.json

Confirmation

BottlecapDave commented 7 months ago

Hello. Diagnostic information is retrieved in the same way as how the entities are created. The only difference is that diagnostics is retrieved (rightly or wrongly) on demand. I know from twitter there was a blip yesterday regarding export information that was changed on OE side. Therefore, if the diagnostics information is coming back correctly, have you tried reloading the integration?

JonathanLew1s commented 7 months ago

Typical, spent two days reloading the integration, downgrading, reinstalling, checking the OE API with curl before raising the ticket. Raise a ticket and OE fix the API output.

Working again. Thanks again for the continued work on the solution.