Rename of the zwave hass.data constants (#7768)

* Rename of the zwave hass.data constants

* Remove zwave since it is already implied
This commit is contained in:
Adam Mills authored and Paulus Schoutsen committed 2017-05-25 21:11:02 -07:00
1 parent 3a843e1817
commit 65c3201fa6
9 files changed
+47 -48

No files matched your search

+3 -5
View File
@@ -8,8 +8,6 @@ from . import const
_LOGGER = logging.getLogger(__name__)
ZWAVE_NETWORK = 'zwave_network'
class ZWaveNodeGroupView(HomeAssistantView):
"""View to return the nodes group configuration."""
@@ -22,7 +20,7 @@ class ZWaveNodeGroupView(HomeAssistantView):
"""Retrieve groups of node."""
nodeid = int(node_id)
hass = request.app['hass']
network = hass.data.get(ZWAVE_NETWORK)
network = hass.data.get(const.DATA_NETWORK)
node = network.nodes.get(nodeid)
if node is None:
return self.json_message('Node not found', HTTP_NOT_FOUND)
@@ -48,7 +46,7 @@ class ZWaveNodeConfigView(HomeAssistantView):
"""Retrieve configurations of node."""
nodeid = int(node_id)
hass = request.app['hass']
network = hass.data.get(ZWAVE_NETWORK)
network = hass.data.get(const.DATA_NETWORK)
node = network.nodes.get(nodeid)
if node is None:
return self.json_message('Node not found', HTTP_NOT_FOUND)
@@ -77,7 +75,7 @@ class ZWaveUserCodeView(HomeAssistantView):
"""Retrieve usercodes of node."""
nodeid = int(node_id)
hass = request.app['hass']
network = hass.data.get(ZWAVE_NETWORK)
network = hass.data.get(const.DATA_NETWORK)
node = network.nodes.get(nodeid)
if node is None:
return self.json_message('Node not found', HTTP_NOT_FOUND)