Add Code
This commit is contained in:
31
code/src/index.html
Normal file
31
code/src/index.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Sensor {name}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Sensor {name}</h1>
|
||||
<h2>Sensor Values:</h2>
|
||||
<ul>
|
||||
<li>Temperature: {temp}°C</li>
|
||||
<li>Humidity: {humidity}%</li>
|
||||
</ul>
|
||||
<form action="/"><button type="submit">Update Values</button></form>
|
||||
<h2>Relay:</h2>
|
||||
<p>
|
||||
Status: {relay_status}
|
||||
</p>
|
||||
<p>
|
||||
<span>
|
||||
<form action="/on"><button type="submit">Relay On</button></form>
|
||||
<form action="/off"><button type="submit">Relay Off</button></form>
|
||||
<form action="/toggle"><button type="submit">Toggle Relay</button></form>
|
||||
</span>
|
||||
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user