node-red-contrib-weather
Version:
Node-RED contrib for weather.
41 lines (37 loc) • 1.7 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('weather',{
category: 'weather',
color: '#5eba8c',
defaults: {
name: { value: "" },
longitude: { value: 0, validate:RED.validators.number() },
latitude: { value: 0, validate:RED.validators.number() }
},
inputs: 1,
outputs: 7,
outputLabels: ["weather","temperature","humidity","weater_status","AQI","sunrise","sunset"],
icon: "weather.png",
label: function() {
return this.name || "weather";
}
});
</script>
<script type="text/x-red" data-template-name="weather">
<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-longitude"><i class="fa fa-arrows-v"></i> Longitude</label>
<input type="text" id="node-input-longitude" placeholder="Longitude">
</div>
<div class="form-row">
<label for="node-input-latitude"><i class="fa fa-arrows-h"></i> Latitude</label>
<input type="text" id="node-input-latitude" placeholder="Latitude">
</div>
</script>
<script type="text/x-red" data-help-name="weather">
<p>node-red-contrib-weather By hang.yin</p>
<p>get weather informations.</p>
<p>For more information, please refer to <a href='https://github.com/YinHangCode/node-red-contrib-weather' target='_blank'>GitHub</a> or <a href="//shang.qq.com/wpa/qunwpa?idkey=8b9566598f40dd68412065ada24184ef72c6bddaa11525ca26c4e1536a8f2a3d" target='_blank'>QQ Group: 107927710</a></p>
</script>