adjust time zone and labels
This commit is contained in:
parent
181568487a
commit
c1f85fc524
@ -31,7 +31,8 @@ update_data <- function(){
|
||||
status = ifelse(value > 1, "on", "off")) %>%
|
||||
mutate(end_time = time + minutes(1))
|
||||
|
||||
|
||||
washer_last_on <- values %>% filter(entity_id == entities$entity_id[1], value > 5) %>% tail(1) %>% pull(time)
|
||||
washer_last_off <- values %>% filter(entity_id == entities$entity_id[1], value < 5) %>% tail(1) %>% pull(time)
|
||||
# ---- generate html
|
||||
current_status <- as.list(NULL)
|
||||
for (entity in entities$entity_id){
|
||||
|
@ -8,7 +8,7 @@ updated: `r format(Sys.time(), format = "%A %I:%M %p", tz = "America/Chicago")`
|
||||
this site updates every `r update_interval` minutes
|
||||
|
||||
## The washing machine is currently: `r current_status[["lamp_a_power"]]`
|
||||
|
||||
The washing machine `r ifelse(current_status$lamp_a_power=="on", "started", "ended")` its most recent cycle at `r format(ifelse(current_status$lamp_a_power=="on", washer_last_on, washer_last_off), format = "%A %I:%M %p", tz = "America/Chicago")`
|
||||
## The dryer is currently: `r current_status[["lamp_b_power"]]`
|
||||
|
||||
--------
|
||||
|
Loading…
x
Reference in New Issue
Block a user