Skip to content

Commit b464f94

Browse files
author
LAB02 Research
committed
Home Assistant 2021.12 release quickfix
Quickfix to mitigate breaking changes introduces bij Home Assistant 2021.12 release
1 parent 3bb243c commit b464f94

File tree

1 file changed

+6
-3
lines changed
  • custom_components/hass_agent_notifier

1 file changed

+6
-3
lines changed

custom_components/hass_agent_notifier/notify.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@
2424
PLATFORM_SCHEMA,
2525
BaseNotificationService,
2626
)
27-
from homeassistant.const import (
27+
"""from homeassistant.const import (
2828
CONF_RESOURCE,
2929
HTTP_BAD_REQUEST,
3030
HTTP_INTERNAL_SERVER_ERROR,
3131
HTTP_OK,
32+
)"""
33+
from homeassistant.const import (
34+
CONF_RESOURCE,
3235
)
3336
import homeassistant.helpers.config_validation as cv
3437

@@ -85,11 +88,11 @@ def send_message(self, message="", title="", **kwargs):
8588
timeout=10
8689
)
8790

88-
if HTTP_INTERNAL_SERVER_ERROR <= response.status_code < 600:
91+
""" if HTTP_INTERNAL_SERVER_ERROR <= response.status_code < 600:
8992
_LOGGER.exception("Server error. Response %d: %s:", response.status_code, response.reason)
9093
elif HTTP_BAD_REQUEST <= response.status_code < HTTP_INTERNAL_SERVER_ERROR:
9194
_LOGGER.exception("Client error. Response %d: %s:", response.status_code, response.reason)
9295
elif HTTP_OK <= response.status_code < 300:
9396
_LOGGER.debug("Success. Response %d: %s:", response.status_code, response.reason)
9497
else:
95-
_LOGGER.debug("Response %d: %s:", response.status_code, response.reason)
98+
_LOGGER.debug("Response %d: %s:", response.status_code, response.reason)"""

0 commit comments

Comments
 (0)