This is due to an incompatibility with Python 3.12. It looks like movement is being made to issue an update, and is hopefully not too horrible a fix.

I wish I’d spotted this, as I use hass for data collection, so any rollback after 30 mins or so isn’t really feasible :|

  • GreatAlbatrossOPMA
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    10 months ago

    Just because it’s a little unclear what’s up, I’m going to try to detail here:

    • The python library (datapoint-api) used to integrate with the Met Office API is not compatible with Python 3.12
    • Simultaneously, the MO is dropping support for the API used by HA (datapoint), in favour of a new one(datahub). End of support is April 2025.
    • Users report that you cannot even sign up for datapoint any more, meaning that for new users, it does not work anyway. (not verified myself)
    • python-datapoint last had a release in 2017. The maintainer is very kindly responding, PRs are in, and it’s hopefully not going to be too troublesome to roll out a (seemingly quite small!) change for existing datapoint users, which should eventually make it downstream.
    • There is also an effort to migrate the met office integration to the new datahub API.

    Work around: I decided to work around by rolling HA back to the final January release, and Met Office fired back into life.
    (I’ll live with 3 days of missing data)
    This is not an ideal solution, but I’m willing to give up easy data export to keep one of my main data sources running!
    For anyone else wanting to try the same, one way to do it is to go into the HA shell using Shell & SSH addon, then downgrading by installing the old version using ha core update --version 2024.1.6
    You could probably also go in and manually patch the library, I just like treating HA like an appliance.

    With a bit of luck, I can sit on this until the change works its way downstream (assuming that is done, and HA don’t decide to just leave Met Office unsupported until somebody has re-worked it for the new API!)

    Screenshot of how small the change to datapoint-api is, just to highlight how even when python is clear about what is being deprecated, that if an external library goes unnoticed for 7 years, you can still have a problem!