Z-Wave Device Registry Support (#17291)

* Add device_registry support for sensor and switch domains

* Add device_registry support for light

* Add device registry to binary_sensor, climate, cover

* Add device registry to zwave fan

* Fix test for config entry loading

* lint

* revert erroneous modification

* Revert device_registry.py change
This commit is contained in:
Charles Garwood authored and Paulus Schoutsen committed 2018-10-16 14:58:25 +02:00
1 parent c6d9ceca63
commit 9c52a3ce22
10 files changed
+189 -31

No files matched your search

+13 -1
View File
@@ -8,7 +8,7 @@ from homeassistant.helpers.entity import Entity
from .const import (
ATTR_NODE_ID, COMMAND_CLASS_WAKE_UP, ATTR_SCENE_ID, ATTR_SCENE_DATA,
ATTR_BASIC_LEVEL, EVENT_NODE_EVENT, EVENT_SCENE_ACTIVATED,
COMMAND_CLASS_CENTRAL_SCENE)
COMMAND_CLASS_CENTRAL_SCENE, DOMAIN)
from .util import node_name, is_node_parsed
_LOGGER = logging.getLogger(__name__)
@@ -110,6 +110,18 @@ class ZWaveNodeEntity(ZWaveBaseEntity):
"""Return unique ID of Z-wave node."""
return self._unique_id
@property
def device_info(self):
"""Return device information."""
return {
'identifiers': {
(DOMAIN, self.node_id)
},
'manufacturer': self.node.manufacturer_name,
'model': self.node.product_name,
'name': node_name(self.node)
}
def network_node_changed(self, node=None, value=None, args=None):
"""Handle a changed node on the network."""
if node and node.node_id != self.node_id: