node-red-contrib-googlehome-actions-v2-piyanggoon
Version:
Google Home Actions V2 (fork by piyanggoon)
43 lines (40 loc) • 1.67 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('googlehome-intent',{
category: 'Google Assistant',
defaults: {
name: {value: ""},
intent: {value: "", required: true}
},
paletteLabel: "Intent",
icon: 'googlehome-intent.png',
outputs: 1,
inputs: 1,
label: function() {
return (this.name !== "" ? "Intent (" + this.name + ")" : "Google Home Intent");
}
});
</script>
<script type="text/x-red" data-template-name="googlehome-intent">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-intent"><i class="fa fa-tag"></i> Intent</label>
<input type="text" id="node-input-intent" placeholder="Intent">
</div>
</script>
<script type="text/x-red" data-help-name="googlehome-intent">
<p>This node represents an intent on the dialog flow.</p>
<p>The <code>intent</code> property in the node editor must contains the same name as configured at DialogFlow Console.</p>
<h3>Input</h3>
<p>It must be connected to the Controller Node created before.</p>
<h3>Outputs</h3>
<ol class="node-ports">
<li>Intent Nodes
<p>It must be directly connected to one or more Ask Nodes. The Ask node will have the default answer which may be changed later.</p>
</li>
</ol>
<h3>Details</h3>
<p>You must create one or more Intent Nodes as configured on the DialogFlow Console.</p>
</script>