sensornumbers and mqtt sensor formats

This commit is contained in:
MichaelDvP
2020-10-18 09:44:32 +02:00
parent ffbe41a634
commit 6ca0e45767
8 changed files with 128 additions and 97 deletions

View File

@@ -179,18 +179,22 @@ class EMSESPDevicesForm extends Component<
<Table size="small" padding="default">
<TableHead>
<TableRow>
<StyledTableCell>ID</StyledTableCell>
<StyledTableCell>Sensor no.</StyledTableCell>
<StyledTableCell align="center">ID</StyledTableCell>
<StyledTableCell align="right">Temperature</StyledTableCell>
</TableRow>
</TableHead>
<TableBody>
{data.sensors.map((sensorData) => (
<TableRow key={sensorData.id}>
<TableRow key={sensorData.no}>
<TableCell component="th" scope="row">
Sensor&nbsp;{sensorData.no}
</TableCell>
<TableCell align="center">
{sensorData.id}
</TableCell>
<TableCell align="right">
{sensorData.temp.toFixed(1)}&nbsp;&deg;C
{sensorData.temp}&nbsp;&deg;C
</TableCell>
</TableRow>
))}

View File

@@ -43,8 +43,9 @@ export interface Device {
}
export interface Sensor {
no: number;
id: string;
temp: number;
temp: string;
}
export interface EMSESPDevices {