ssenart / home-assistant-gazpar

GrDF Gazpar meter integration for Home Assistant
MIT License
43 stars 9 forks source link

cannot import name 'ATTR_STATE_CLASS' #68

Open magicpapy opened 1 week ago

magicpapy commented 1 week ago

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 commented 6 days ago

Hello,

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