mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
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:
parent
90b80880ed
commit
9b0f4fa234
@ -173,6 +173,31 @@
|
|||||||
hidden$='[[!showHelp]]'
|
hidden$='[[!showHelp]]'
|
||||||
></ha-service-description>
|
></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>
|
||||||
<div class='card-actions'>
|
<div class='card-actions'>
|
||||||
<paper-input
|
<paper-input
|
||||||
@ -521,6 +546,13 @@ class HaConfigZwave extends Polymer.Element {
|
|||||||
return { node_id: this.nodes[selectedNode].attributes.node_id };
|
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) {
|
computeGetNodeName(selectedNode) {
|
||||||
if (this.selectedNode === -1 ||
|
if (this.selectedNode === -1 ||
|
||||||
!this.nodes[selectedNode].entity_id) return -1;
|
!this.nodes[selectedNode].entity_id) return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user