discovery: If unknown NetDisco service discovered, log about it. (#9280)

Otherwise, known services are logged, ignored are logged, but unknown -
not. Logging them is quite helpful for someone working on adding new
discovery service to NetDisco/HA, and would help to decouple NetDisco
library further: another project may use a generic NetDisco library,
and contribute new service to it, which won't be automatically supported
by HA. But logging about it would be a good hint to HA users that they
can look into supporting it.
This commit is contained in:
Paul Sokolovsky 2017-09-03 23:27:13 +03:00 committed by Fabian Affolter
parent 68343ac81f
commit 38e1b81ff6

View File

@ -100,6 +100,7 @@ def async_setup(hass, config):
# We do not know how to handle this service. # We do not know how to handle this service.
if not comp_plat: if not comp_plat:
logger.info("Unknown service discovered: %s %s", service, info)
return return
discovery_hash = json.dumps([service, info], sort_keys=True) discovery_hash = json.dumps([service, info], sort_keys=True)