Add new Z-Wave services, heal_node and test_node (#565)

* Add new Z-Wave services, heal_node and test_node

* lint
This commit is contained in:
John Arild Berentsen 2017-11-05 18:44:18 +01:00 committed by Paulus Schoutsen
parent 90b80880ed
commit 9b0f4fa234

View File

@ -172,7 +172,32 @@
service='print_node'
hidden$='[[!showHelp]]'
></ha-service-description>
<ha-call-service-button
hass='[[hass]]'
domain='zwave'
service='heal_node'
service-data=[[computeHealNodeServiceData(selectedNode)]]
>Heal Node</ha-call-service-button>
<ha-service-description
hass='[[hass]]'
domain='zwave'
service='heal_node'
hidden$='[[!showHelp]]'
></ha-service-description>
<ha-call-service-button
hass='[[hass]]'
domain='zwave'
service='test_node'
service-data=[[computeNodeServiceData(selectedNode)]]
>Test Node</ha-call-service-button>
<ha-service-description
hass='[[hass]]'
domain='zwave'
service='test_node'
hidden$='[[!showHelp]]'
></ha-service-description>
</div>
<div class='card-actions'>
<paper-input
@ -521,6 +546,13 @@ class HaConfigZwave extends Polymer.Element {
return { node_id: this.nodes[selectedNode].attributes.node_id };
}
computeHealNodeServiceData(selectedNode) {
return {
node_id: this.nodes[selectedNode].attributes.node_id,
return_routes: true
};
}
computeGetNodeName(selectedNode) {
if (this.selectedNode === -1 ||
!this.nodes[selectedNode].entity_id) return -1;