Support multiple temperature sensors

This commit is contained in:
Gunnar Skjold
2020-08-05 19:55:16 +02:00
parent 6479fd6a63
commit e121ec75d8
10 changed files with 325 additions and 30 deletions

11
web/temperature_foot.html Normal file
View File

@@ -0,0 +1,11 @@
</div>
<hr/>
<div class="row form-group">
<div class="col-6">
<a href="/" class="btn btn-outline-secondary">Back</a>
</div>
<div class="col-6 text-right">
<button class="btn btn-primary">Save</button>
</div>
</div>
</form>

View File

@@ -0,0 +1,3 @@
<form method="post" action="/save">
<input type="hidden" name="tempConfig" value="true"/>
<div class="my-3 p-3 bg-white rounded shadow">

28
web/temperature_row.html Normal file
View File

@@ -0,0 +1,28 @@
<input type="hidden" name="sensor${index}" value="${address}"/>
<div class="row mb-3">
<div class="col-xl-3 col-lg-4 col-sm-6">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">Address</span>
</div>
<input name="sensor${index}address" type="text" class="form-control" value="${address}" maxlength="16" disabled/>
</div>
</div>
<div class="col-xl-4 col-lg-3 col-sm-6">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">Name</span>
</div>
<input name="sensor${index}name" type="text" class="form-control" value="${name}" maxlength="32"/>
</div>
</div>
<div class="col-xl-3 col-lg-3 col-sm-6">
<div class="form-check">
<input name="sensor${index}common" class="form-check-input" type="checkbox" value="true" id="sensor${index}common" ${common}>
<label class="form-check-label" for="sensor${index}common">Include in average</label>
</div>
</div>
<div class="col-xl-2 col-lg-2 col-sm-6">
${value} °C
</div>
</div>