Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'ATTR_STATE_CLASS' #68

Open
magicpapy opened this issue Oct 22, 2024 · 1 comment
Open

cannot import name 'ATTR_STATE_CLASS' #68

magicpapy opened this issue Oct 22, 2024 · 1 comment

Comments

@magicpapy
Copy link

Hi,

First of all, thanks for this work, and for the documentation, which is crystal clear.

I have an issue while trying to restart after having installed as described here : https://github.com/ssenart/home-assistant-gazpar

Here is the error message :
Platform error sensor.gazpar - cannot import name 'ATTR_STATE_CLASS' from 'homeassistant.components.sensor.const' (/usr/src/homeassistant/homeassistant/components/sensor/const.py)
And of course I can not find the gazpar sensor (even if I find a device).

My password includes no special characters (it includes a "-" mais it is not a special character ?).
I looked at utils.py, which imports ATTR_STATE_CLASS, and if I just remove ATTR_STATE_CLASS, I have the same problem with SensorStateClass.

I use a docker installation of HA.

I'm quite lost, so a help would be nice :)

@ssenart
Copy link
Owner

ssenart commented Oct 24, 2024

Hello,

It looks like an incompatibility with HA version. Which HA version do you use and same question on version of home-assistant-gazpar ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants