UNPKG

node-red-contrib-hubitat

Version:
50 lines (45 loc) 1.76 kB
<script type="text/javascript"> RED.nodes.registerType('hubitat location', { category: 'hubitat', color: '#ACE043', defaults: { name: { value: '' }, server: { type: 'hubitat config', required: true }, }, inputs: 0, outputs: 1, icon: 'location.svg', label() { return this.name || 'location'; }, paletteLabel: 'location', }); </script> <script type="text/html" data-template-name="hubitat location"> <div class="form-row"> <label for="node-input-server"><i class="fa fa-globe"></i> Server</label> <input type="text" id="node-input-server"> </div> <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> </script> <script type="text/html" data-help-name="hubitat location"> <p>A node that can send global location events of your Hubitat hub.</p> <h3>Output</h3> <dl class="message-properties"> <dt class="optional">msg.payload <span class="property-type">object</span></dt> <dd>Information about the location event. <br> <p><strong>Note:</strong> The <code>displayName</code> and <code>descriptionText</code> fields are set if the hub event contained these values.</p> <p>Example:</p> <pre>payload: { name: "systemStart", value: "2.1.9.117", descriptionText: "System startup with build: 2.1.9.117" }</pre> </dd> </dl> <h3>Details</h3> <p>When a location event occurs at the hub, the Maker API app sends the event to Node-RED via HTTP POST.</p> <p>This node requires that you have enabled the "Include location events to be sent by POST?" option in the Maker API app and webhook configured.</p> </script>