2021.4 Upgrade errors on Platform Version

After reading the breaking changes, I am still very confused on how to fix my problem.
When doing a config Validation I get the following

Platform error sensor.version - cannot import name ‘HaVersion’ from ‘pyhaversion’ (/usr/local/lib/python3.8/site-packages/pyhaversion/init.py)
Platform error sensor.version - cannot import name ‘HaVersion’ from ‘pyhaversion’ (/usr/local/lib/python3.8/site-packages/pyhaversion/init.py)
Platform error sensor.version - cannot import name ‘HaVersion’ from ‘pyhaversion’ (/usr/local/lib/python3.8/site-packages/pyhaversion/init.py)

I saw the Custom integrations: Version warning in the blog post but I am at a total loss on how to fix it.
Can someone point me in the right direction.
Thanks so much.

i comment out my sensors for sensor: version

and now the errors are gone… something with this sensor wrong maybe?

strange, after I reboot HA and comment in the sensor: version again the error was gone…

Yeah I’d the same issue…and the same solution :grin: posted over in the release thread earlier today on it

1 Like

Can you please explain how you removed the sensors.
I am still very confused on what I am looking for.
Thanks

In my sensor.yaml file (or configuration.yaml if that’s where your sensors are) I just commented out any sensor using the version platform (put # before the line in your config files), then restarted HA, once rebooted I added back the sensors (remove # in yaml) and rebooted. All working fine after that.

Thanks for the help. I did find one file that had a platform: version in it but after running check again it did not fix it.

Seems that my error is looking for something specific, but do not know what to do.

Platform error sensor.version - cannot import name ‘HaVersion’ from ‘pyhaversion’ (/usr/local/lib/python3.8/site-packages/pyhaversion/init.py)
Platform error sensor.version - cannot import name ‘HaVersion’ from ‘pyhaversion’ (/usr/local/lib/python3.8/site-packages/pyhaversion/init.py)

You most likely have a custom integration that requests an older version of pyhaversion, I’m taking a guess that it’s the breaking_changes custom integration, if so update it, if no look at the manifest.json file of your other custom integrations.

1 Like

It is the breaking changes file. I deleted it from HACS and my config.yaml, but check config still gives me the error. It feels like I am in a loop. Is there another way to clear it out to restart safely.

You have to restart for the proper version of pyhaversion being installed.
ha core restart

Thank you so much, that did the trick. Was so afraid to do it because I have crashed my system before.