From Home Assistant with template:
Time now is {{ now() }}
Will see:
Time now is 2021-11-16 15:00:00.012302+07:00
→ Its correct local time
…
But from esphome:
time:
- platform: homeassistant
id: vietnamtime
- platform: pcd8544
reset_pin: D0
cs_pin: D8
dc_pin: D1
contrast: 0x28
update_interval: 5s
lambda: |-
// Print “Date of today” in top center.
it.strftime(42, 8, id(font1), TextAlign::TOP_CENTER, “%d-%b-%Y”, id(vietnamtime).now());
// Print time in HH:MM format
it.strftime(0, 45, id(font2), TextAlign::BASELINE_LEFT, “%H:%M”, id(vietnamtime).now());
Will see on the screen:
16-NOV-2021
01:00
==> Its always late 14 hours with time on Home Assistant,
Pls help to check why and how to fix this error,
I’m using Hass: core-2021.11.3, supervisor-2021.10.8, Home Assistant OS 6.6 and ESPHome newest version 2021.10.3
Many thanks,
TrungNV