Closed dronix27 closed 2 years ago
Same story for Home Assistant 2021.12.3 "Setup failed for narodmon: Unable to import component: cannot import name 'HTTP_OK' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)"
кому срочно, изменить
custom_components/narodmon/api.py
#from homeassistant.const import ATTR_ID, HTTP_OK
from homeassistant.const import ATTR_ID
#if resp.status != HTTP_OK:
if resp.status != 200:
Fixed in #46
Environment
Describe the bug
The integration cannot setup on HA startup. There is an error in the log: Error occurred loading configuration flow for integration narodmon: cannot import name 'HTTP_OK' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)
Configuration.yaml
Steps to Reproduce
Upgrade HA to 2021.12
Expected behavior
The integration is loaded on HA startup.
Debug log
Additional context