mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Use HTTP_OK constant (#33798)
* Use http ok constant * Remove incorrect use * Run isort * Fix pylint by adding missing imports * Fix pylint by fixing one import
This commit is contained in:
@@ -13,6 +13,7 @@ from homeassistant.const import (
|
||||
CONF_UNIT_OF_MEASUREMENT,
|
||||
CONF_URL,
|
||||
CONF_VALUE_TEMPLATE,
|
||||
HTTP_OK,
|
||||
POWER_WATT,
|
||||
STATE_UNKNOWN,
|
||||
)
|
||||
@@ -245,7 +246,7 @@ class EmonCmsData:
|
||||
_LOGGER.error(exception)
|
||||
return
|
||||
else:
|
||||
if req.status_code == 200:
|
||||
if req.status_code == HTTP_OK:
|
||||
self.data = req.json()
|
||||
else:
|
||||
_LOGGER.error(
|
||||
|
||||
Reference in New Issue
Block a user