UNPKG

node-red-contrib-myhome-bticino-v2

Version:
46 lines (42 loc) 2.17 kB
<script type="text/javascript"> RED.nodes.registerType('myhome-commandsession',{ category: 'Bticino MyHome', color: '#a6bbcf', defaults: { name: { value: '', required: true }, gateway: { type: 'myhome-gateway', required: true }, intercommandsdelay: { value: '', required: false, validate: function(v){return (v === '' || v === undefined || parseInt(v) >= 50)} }, intercommandsdelay_frommsg: { value: false, required: false} }, inputs: 1, outputs: 1, icon: 'font-awesome/fa-terminal', paletteLabel: 'MH Inject', label: function() { return this.name || 'MH Inject'; } }); </script> <script type="text/x-red" data-template-name="myhome-commandsession"> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.name"></span></label> <input type="text" id="node-input-name" data-i18n="[placeholder]mh-cmdsession.config.name-placeholder"/> </div> <div class="form-row"> <label for="node-input-gateway"><i class="fa fa-server"></i> <span data-i18n="common.gateway"></span></label> <input type="text" id="node-input-gateway"/> </div> <div style="border-top-style: solid ;border-width: 1px; border-color: #CCCCCC; height: 10px;"></div> <div class="form-row"> <label for="node-input-intercommandsdelay"><i class="fa fa-history"></i> <span data-i18n="mh-cmdsession.config.intercommandsdelay"></span></label> <input type="text" id="node-input-intercommandsdelay" data-i18n="[placeholder]mh-cmdsession.config.intercommandsdelay-placeholder"/> &nbsp;<i class="fa fa-info-circle" data-i18n="[title]mh-cmdsession.config.intercommandsdelay-info"></i> <br> <div style="display: inline-block; position: relative; width: 100%; height: 20px;"> <label></label> <label for="node-input-intercommandsdelay_frommsg" style="width:70%"> <input type="checkbox" id="node-input-intercommandsdelay_frommsg" style="display:inline-block; margin-left:10px; width:22px; vertical-align:baseline;"/><span data-i18n="mh-cmdsession.config.intercommandsdelay_frommsg"></span> </label> </div> </div> </script>