natekspencer / hacs-vivint

Home Assistant integration for a Vivint home security system.
MIT License
66 stars 5 forks source link

Newly added diagnostic config entity causes errors in pre 2021.11 HA versions #21

Closed mat1583 closed 2 years ago

mat1583 commented 2 years ago

I'm currently running core-2021.10.6 due to some issues I ran into with 2021.11. It looks like the diagnostic sensor you added for 2021.11 has some compatibility issues with anything before 2021.11

Logger: homeassistant.setup Source: setup.py:316 First occurred: 7:13:38 AM (1 occurrences) Last logged: 7:13:38 AM

Unable to prepare setup for platform vivint.sensor: Platform not found (cannot import name 'ENTITY_CATEGORY_DIAGNOSTIC' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)).


Invalid config The following integrations and platforms could not be set up:

vivint.sensor Please check your config and logs.


Perhaps there should be a version check before trying to setup this entity?

natekspencer commented 2 years ago

I agree that there needs to be a better way to indicate supported HA versions. I'd rather not litter the code with various version checks when features are released, however, as that can get messy. I wonder if there is a way to add a minimum/required HA version to the manifest.json or something.

You should be able to reinstall the previous version of this integration if you haven't already and be fine to go.

natekspencer commented 2 years ago

It looks like there isn't a way to do this in manifest.json. I'll just have to update the releases and try to make sure I specify a minimum HA version if it coincides with recent HA releases.

mat1583 commented 2 years ago

Sounds good. I've downgraded in the meantime. Thanks for your prompt response.