Hi, I am trying to display times across multiple time zone
my code is:
time:
- platform: sntp
timezone: 'Europe/London'
id: lontime
- platform: sntp
timezone: 'America/New_York'
id: nytime
display:
- platform: tm1637
clk_pin: D6
dio_pin: D5
update_interval: 500ms
lambda: |-
static int i = 0;
i++;
if ((i % 2) == 0)
it.strftime("%H.%M", id(nytime).now());
else
it.strftime("%H%M", id(nytime).now();
- platform: tm1637
clk_pin: D5
dio_pin: D6
update_interval: 500ms
lambda: |-
static int i = 0;
i++;
if ((i % 2) == 0)
it.strftime("%H.%M", id(lontime).now());
else
it.strftime("%H%M", id(lontime).now());
If i declare the London timezone last all, both displays show london time, if i declare NY timezone last, both displays show NY time.
It looks like the nodemcuv2 can only deal in one time zone at a time? Is there a why i can change the time zone as writing it to the display. I want to try to get away from just using static +5 hours as this will not take into account daylight saving.
Thanks
Pete