mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
minor layout changes
This commit is contained in:
parent
4a5c32e375
commit
69799bd11e
@ -55,7 +55,8 @@ def get_service(hass, config):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
nma = Session()
|
nma = Session()
|
||||||
response = nma.get(_RESOURCE + 'verify', params={"apikey" : config[DOMAIN][CONF_API_KEY]})
|
response = nma.get(_RESOURCE + 'verify',
|
||||||
|
params={"apikey" : config[DOMAIN][CONF_API_KEY]})
|
||||||
tree = ET.fromstring(response.content)
|
tree = ET.fromstring(response.content)
|
||||||
if tree[0].tag == 'error':
|
if tree[0].tag == 'error':
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
@ -88,9 +89,10 @@ class NmaNotificationService(BaseNotificationService):
|
|||||||
self._data['description'] = message
|
self._data['description'] = message
|
||||||
self._data['priority'] = 0
|
self._data['priority'] = 0
|
||||||
|
|
||||||
response = self.nma.get(_RESOURCE + 'notify', params=self._data)
|
response = self.nma.get(_RESOURCE + 'notify',
|
||||||
|
params=self._data)
|
||||||
tree = ET.fromstring(response.content)
|
tree = ET.fromstring(response.content)
|
||||||
if tree[0].tag == 'error':
|
if tree[0].tag == 'error':
|
||||||
_LOGGER.exception(
|
_LOGGER.exception(
|
||||||
"Unable to perform request. "
|
"Unable to perform request. "
|
||||||
"Error: {}".format(tree[0].text))
|
"Error: {}".format(tree[0].text))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user