From ee5adbcb299179a74b86aeeab75e1681d7aad056 Mon Sep 17 00:00:00 2001 From: Stephen Ludgate Date: Mon, 18 Mar 2024 13:33:39 +0000 Subject: [PATCH] Update README.md Correction found when using 24h time, found by @peterthepeter. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 703135e..808458b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Time format for the hourly conditions can be formatted using the python function `{{ as_timestamp(weather_home_hourly.forecast[0].datetime) | timestamp_custom('%I') | int }} {{ as_timestamp(weather_home_hourly.forecast[0].datetime) | timestamp_custom('%p') }}` = 2 PM `{{ as_timestamp(weather_home_hourly.forecast[0].datetime) | timestamp_custom('%H') }}` = 14 -If you go with a 24h hour display (e.g. 14) - amend your automation yaml file `wm_time_0`, `wm_time_1`, `wm_time_2` and `wm_time_3` from `{{ state_attr('sensor.weatherman_data_tag','wm_time_0') | string | upper }}` to `{{ '%0.2d' | format(state_attr('sensor.weatherman_data_tag','wm_time_0')) | string | upper }}` or you will get erorrs as it tries to format a string as a deciaml ('%0.2d'). +If you go with a 24h hour display (e.g. 14) - amend your automation yaml file `wm_time_0`, `wm_time_1`, `wm_time_2` and `wm_time_3` from `{{ state_attr('sensor.weatherman_data_tag','wm_time_0') | string | upper }}` to `{{ '%0.2d' | format(state_attr('sensor.weatherman_data_tag','wm_time_0') | int) | string | upper }}` or you will get erorrs as it tries to format a string as a deciaml ('%0.2d'). ### Day names To change the display of the day names to your prefered language, replace these occurences in the configuration with your own: