mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-13 20:11:53 +01:00
Minor uptime docs fixes (#948)
This commit is contained in:
parent
2131aa056a
commit
8689cb129f
@ -41,14 +41,14 @@ with human readable output.
|
||||
sensor:
|
||||
- platform: uptime
|
||||
name: Uptime Sensor
|
||||
id: uptime
|
||||
id: uptime_sensor
|
||||
update_interval: 60s
|
||||
on_raw_value:
|
||||
then:
|
||||
- text_sensor.template.publish:
|
||||
id: uptime_human
|
||||
state: !lambda |-
|
||||
int seconds = round(id(uptime).raw_state);
|
||||
int seconds = round(id(uptime_sensor).raw_state);
|
||||
int days = seconds / (24 * 3600);
|
||||
seconds = seconds % (24 * 3600);
|
||||
int hours = seconds / 3600;
|
||||
|
Loading…
Reference in New Issue
Block a user