File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,12 @@ logger:
7272 level : DEBUG
7373 baud_rate : 460800
7474
75+ globals :
76+ - id : timezone_applied
77+ type : bool
78+ restore_value : false
79+ initial_value : " false"
80+
7581button :
7682 - platform : factory_reset
7783 disabled_by_default : true
@@ -170,6 +176,15 @@ time:
170176 - light.turn_on :
171177 id : led_matrix_light
172178 brightness : 0.1
179+ - if :
180+ condition :
181+ - lambda : ' return !id(timezone_applied);'
182+ then :
183+ - lambda : |-
184+ id(sntp_time).set_timezone(id(tz).state);
185+ id(sntp_time).call_setup();
186+ id(timezone_applied) = true;
187+
173188font :
174189 - id : tinyfont
175190 file : " lexis.ttf"
@@ -242,6 +257,9 @@ text:
242257 optimistic : yes
243258 initial_value : " GMT0"
244259 restore_value : true
260+ on_value :
261+ then :
262+ - lambda : ' id(timezone_applied) = false;'
245263
246264light :
247265 - platform : esp32_rmt_led_strip
You can’t perform that action at this time.
0 commit comments