- failed temp and humidity reading wont prevent data sending
- printing of water level
This commit is contained in:
@@ -69,6 +69,18 @@ Template.state.helpers({
|
||||
|
||||
last_sensor_reading: last_sensor_reading,
|
||||
|
||||
water_level: function() {
|
||||
var sensor = last_sensor_reading();
|
||||
if (sensor) {
|
||||
if (parseInt(sensor.tankFull) === 1) return '100 %';
|
||||
else if (parseInt(sensor.tankLevel4) === 1) return '80 %';
|
||||
else if (parseInt(sensor.tankLevel3) === 1) return '60 %';
|
||||
else if (parseInt(sensor.tankLevel2) === 1) return '40 %';
|
||||
else if (parseInt(sensor.tankLevel1) === 1) return '20 %';
|
||||
else '0 %'
|
||||
}
|
||||
},
|
||||
|
||||
water_now_button_class: function() {
|
||||
var stateObject = controller_state();
|
||||
if (stateObject.state && (stateObject.state.out_valve === 'open' || stateObject.state.out_valve === 'opening')) {
|
||||
|
||||
Reference in New Issue
Block a user