mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
update suncalc to use fa icons
This commit is contained in:
parent
cdec6f842d
commit
132ceaffc5
@ -16,15 +16,15 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="sunrise">
|
||||
<div class="form-row">
|
||||
<label for="node-input-lat"><i class="icon-globe"></i> Latitude</label>
|
||||
<label for="node-input-lat"><i class="fa fa-globe"></i> Latitude</label>
|
||||
<input type="text" id="node-input-lat" placeholder="51.025">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-lon"><i class="icon-globe"></i> Longitude</label>
|
||||
<label for="node-input-lon"><i class="fa fa-globe"></i> Longitude</label>
|
||||
<input type="text" id="node-input-lon" placeholder="-1.4">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-start"><i class="icon-time"></i> Start</label>
|
||||
<label for="node-input-start"><i class="fa fa-clock-o"></i> Start</label>
|
||||
<select id="node-input-start" style='width:70%'>
|
||||
<option value="sunrise">Sunrise</option>
|
||||
<option value="sunriseEnd">Sunrise end</option>
|
||||
@ -35,7 +35,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-end"><i class="icon-time"></i> End</label>
|
||||
<label for="node-input-end"><i class="fa fa-clock-o"></i> End</label>
|
||||
<select id="node-input-end" style='width:70%'>
|
||||
<option value="sunset">Sunset, civil twilight starts</option>
|
||||
<option value="sunsetStart">Sunset start</option>
|
||||
@ -46,7 +46,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
</div>
|
||||
</script>
|
||||
|
@ -40,7 +40,7 @@ module.exports = function(RED) {
|
||||
var e1 = (hour*60+mins) - (hour1*60+mins1);
|
||||
var e2 = (hour*60+mins) - (hour2*60+mins2);
|
||||
var moon = SunCalc.getMoonIllumination(now).fraction;
|
||||
msg = { payload:0, topic:"sun", moon:moon };
|
||||
var msg = { payload:0, topic:"sun", moon:moon };
|
||||
if ((e1 > 0) & (e2 < 0)) { msg.payload = 1; }
|
||||
if (oldval == null) { oldval = msg.payload; }
|
||||
if (msg.payload == 1) { node.status({fill:"yellow",shape:"dot",text:"day"}); }
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-suncalc",
|
||||
"version" : "0.0.1",
|
||||
"version" : "0.0.2",
|
||||
"description" : "A Node-RED node to provide a signal at sunrise and sunset",
|
||||
"dependencies" : {
|
||||
"suncalc" : "1.5.*"
|
||||
|
Loading…
Reference in New Issue
Block a user