Hi all,
Can someone please help me work out why this is not working as expected? Instead of a properly formatted date string like “Thursday 11 January 2024” what I actually get is a random set of characters, currently “LA”.
- lambda: id(disp1).set_component_text_printf("Home.date", "%s", id(homeassistant_time).now().strftime("%A %d %B %Y"));
time:
- platform: homeassistant
id: homeassistant_time
on_time:
- seconds: 0
minutes: /1
then:
- lambda: id(disp1).set_component_text_printf("Home.time", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute);
- lambda: id(disp1).set_component_text_printf("Home.date", "%s", id(homeassistant_time).now().strftime("%A %d %B %Y"));
on_time_sync:
then:
- wait_until:
switch.is_on: nextion_init
- lambda: id(disp1).set_component_text_printf("Home.time", "%02i:%02i", id(homeassistant_time).now().hour, id(homeassistant_time).now().minute);
- lambda: id(disp1).set_component_text_printf("Home.date", "%s", id(homeassistant_time).now().strftime("%A %d %B %Y"));
Thank you!