Skip to content

Commit 8936c4f

Browse files
committed
readme.md
1 parent 6c900cc commit 8936c4f

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,32 @@ For example : http://192.168.2.34:8123/lovelace/home?kiosk
328328
Note, that this only works correctly, if you hide the sidebar by default, for the Kiosk user:
329329

330330
![home assistant](https://i.imgur.com/pKVELn4.png)
331+
332+
## transfer system status data to home assistant
333+
334+
```
335+
- platform: rest
336+
name: kiosk_sensors
337+
scan_interval: 60
338+
resource: http://192.168.2.38:5000/api/status
339+
json_attributes:
340+
- disk
341+
- temperature
342+
- memory
343+
- cpu
344+
value_template: "OK"
345+
346+
- platform: template
347+
sensors:
348+
kiosk_temperature:
349+
unique_id: kiosk_temperature
350+
friendly_name: "CPU Temperature"
351+
value_template: "{{ state_attr('sensor.kiosk_sensors', 'temperature')['cpuTemperature'] | round(1) }}"
352+
device_class: temperature
353+
unit_of_measurement: "°C"
354+
kiosk_cpu_percent:
355+
unique_id: kiosk_cpu_percent
356+
friendly_name: "CPU Usage"
357+
value_template: "{{ state_attr('sensor.kiosk_sensors', 'cpu')['cpuUsage'] | round(1)}}"
358+
unit_of_measurement: "%"
359+
```

kiosk-server/Pages/Setup.razor

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
<tr>
125125
<th style ="width:30%">Usage</th>
126126
<th style ="width:30%">Temperature</th>
127-
<th>Throttled</th>
127+
<th>State</th>
128128
</tr>
129129
</thead>
130130
<tbody>
@@ -136,7 +136,7 @@
136136
@SetupModel.Temperature.CpuTemperature.ToString("N1") &deg;C
137137
</td>
138138
<td>
139-
@SetupModel.Temperature.ThrottledState
139+
@(string.IsNullOrEmpty(SetupModel.Temperature.ThrottledState) ? "Normal" : SetupModel.Temperature.ThrottledState)
140140
</td>
141141
</tr>
142142
</tbody>

0 commit comments

Comments
 (0)