Show all UPNP/IGD sensors in one device (#27517)

* show all UPNP/IGD sensors in one device

* use device name correctly

* Use id of device
This commit is contained in:
escoand authored and Fabian Affolter committed 2019-10-31 20:51:35 +01:00
1 parent ec373d90c1
commit 82729bef70
3 files changed
+11 -2

No files matched your search

+5 -2
View File
@@ -2,6 +2,7 @@
import logging
from homeassistant.core import callback
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.typing import HomeAssistantType
@@ -93,9 +94,11 @@ class UpnpSensor(Entity):
def device_info(self):
"""Get device info."""
return {
"identifiers": {(DOMAIN_UPNP, self.unique_id)},
"name": self.name,
"connections": {(dr.CONNECTION_UPNP, self._device.udn)},
"identifiers": {(DOMAIN_UPNP, self._device.udn)},
"name": self._device.name,
"manufacturer": self._device.manufacturer,
"model": self._device.model_name,
}