krbaker / hass-sunpower

Home Assistant SunPower Integration using the local installer ethernet interface.
Apache License 2.0
53 stars 22 forks source link

Cannot import name 'ELECTRICAL_VOLT_AMPERE' from 'homeassistant.const' #6

Closed ryphez closed 2 years ago

ryphez commented 2 years ago

Updated to latest HA 2021.8.0 and Sunpower integration didn't start up

`Logger: homeassistant.setup Source: setup.py:173 First occurred: 9:25:34 AM (1 occurrences) Last logged: 9:25:34 AM

Setup failed for sunpower: Unable to import component: cannot import name 'ELECTRICAL_VOLT_AMPERE' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)`

ryphez commented 2 years ago

Looks like the naming changed in the latest release. Here is the commit that broke it, https://github.com/home-assistant/core/commit/074d762664976d3414b8a33535e9b850d80a42fa

ryphez commented 2 years ago

Testing some locally

"POWER_VOLT_AMPERE" changed to "POWER_VOLT_AMPERE" "VOLT" changed to "ELECTRIC_POTENTIAL_VOLT"

ryphez commented 2 years ago

Tested locally and worked, created a Pull request, https://github.com/krbaker/hass-sunpower/pull/7