Minor uptime docs fixes (#948)

This commit is contained in:
foxsam21 2021-01-27 02:09:41 -05:00 committed by GitHub
parent 2131aa056a
commit 8689cb129f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;