UNPKG

node-red-contrib-tibber-api

Version:

Node Red module for integrating with Tibber api

62 lines (57 loc) 2.19 kB
<script type="text/javascript"> RED.nodes.registerType("tibber-notify", { category: "Tibber API", color: "#23B8CC", defaults: { name: { value: "" }, active: { value: true }, apiEndpointRef: { value: null, type: "tibber-api-endpoint" }, notifyTitle: { value: "" }, notifyMessage: { value: "" }, notifyScreen: { value: "" } }, inputs: 1, outputs: 0, align: "right", icon: "envelope.png", label: function() { return this.name || "tibber-notify"; } }); </script> <script type="text/x-red" data-template-name="tibber-notify"> <div class="form-row" style="white-space: nowrap;"> <label style="white-space:nowrap;width:150px;" for="node-input-apiEndpointRef"><i class="icon-tag"></i> API Endpoint</label> <input type="text" id="node-input-apiEndpointRef" placeholder="API Endpoint"> </div> <div class="form-row" style="white-space: nowrap;"> <label style="white-space:nowrap;width:150px;" for="node-input-name"><i class="icon-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name" /> </div> <hr> <div class="form-row" style="white-space: nowrap;"> <label style="white-space:nowrap;width:150px;" for="node-input-notifyTitle"><i class="icon-tag"></i> Notification title</label> <input type="text" id="node-input-notifyTitle" placeholder="{payload.title}" /> </div> <div class="form-row" style="white-space: nowrap;"> <label style="white-space:nowrap;width:150px;" for="node-input-notifyMessage"><i class="icon-tag"></i> Notification message</label> <input type="text" id="node-input-notifyMessage" placeholder="{payload.message}" /> </div> <div class="form-row" style="white-space: nowrap;"> <label style="white-space:nowrap;width:150px;" for="node-input-notifyScreen"><i class="icon-tag"></i> Landing screen</label> <input type="text" id="node-input-notifyScreen" placeholder="{payload.screen}" /> </div> </script> <script type="text/x-red" data-help-name="tibber-api"> <p>A simple node that enables you to query Tibber API.</p> </script>