UNPKG

@george.talusan/node-red-contrib-eufy-robovac

Version:

Node RED plugin wrapper around [eufy-robovac-js](https://github.com/gtalusan/eufy-robovac-js).

59 lines (56 loc) 1.59 kB
<script type='text/javascript'> RED.nodes.registerType('command', { category: 'eufy robovac', color: '#41efdc', defaults: { config: { type: 'eufy-robovac-config', required: true }, name: { value: '' }, command: { value: 'clean' } }, inputs: 1, outputs: 0, icon: 'eufy-logo.svg', label: function () { return this.name || 'command'; }, oneditprepare: () => { $('#node-input-command').typedInput({ types: [ { value: 'event', options: [ { value: 'clean', label: 'Clean' }, { value: 'cleanRooms', label: 'Clean Room(s)' }, { value: 'goHome', label: 'Go Home' }, { value: 'locate', label: 'Locate' }, ] } ] }); } } ); </script> <script type='text/html' data-template-name='command'> <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-config'><i class='fa fa-bookmark'></i> Config</label> <input type='text' id='node-input-config'> </div> <div class='form-row'> <label for='node-input-command'><i class='fa fa-bookmark'></i> Command</label> <input type='text' id='node-input-command'> </div> <div class='form-tips'><b>Tip:</b> This is here to help.</div> </script>