additional log info and strings fix (#35622)

pull/35828/head
Jason Hunter 2020-05-14 11:25:58 -04:00 committed by Franck Nijhof
parent bc0109256f
commit 05778ad307
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 8 additions and 4 deletions

View File

@ -143,19 +143,22 @@ class EventManager:
async def async_parse_messages(self, messages) -> None:
"""Parse notification message."""
for msg in messages:
# LOGGER.debug("ONVIF Event Message %s: %s", self.device.host, pformat(msg))
topic = msg.Topic._value_1
parser = PARSERS.get(topic)
if not parser:
if topic not in UNHANDLED_TOPICS:
LOGGER.info("No registered handler for event: %s", msg)
LOGGER.info(
"No registered handler for event from %s: %s",
self.unique_id,
msg,
)
UNHANDLED_TOPICS.add(topic)
continue
event = await parser(self.unique_id, msg)
if not event:
LOGGER.warning("Unable to parse event: %s", msg)
LOGGER.warning("Unable to parse event from %s: %s", self.unique_id, msg)
return
self._events[event.uid] = event

View File

@ -23,6 +23,7 @@
},
"manual_input": {
"data": {
"name": "Name",
"host": "[%key:common::config_flow::data::host%]",
"port": "[%key:common::config_flow::data::port%]"
},