Timezone support on Blueprint

Still pending the code on ESPHome to store for when WiFi is out
Pending API doc.
I haven't merged this in another service for now to not break the API, but this should be done for v4.4.0

Solves #2024
This commit is contained in:
Edward Firmo
2024-04-08 14:05:57 +02:00
parent 019efade79
commit c98f50543d
4 changed files with 522 additions and 2 deletions

View File

@@ -871,6 +871,19 @@ api:
}
}
- service: set_timezone # To do: Merge this on another init service for v4.4.0
variables:
timezone: string
then:
- lambda: |-
if (!timezone.empty()) {
time_provider->dump_config();
ESP_LOGI("api.service.set_timezone", "Setting timezone: %s", timezone.c_str());
time_provider->set_timezone(timezone.c_str());
time_provider->call_setup();
time_provider->dump_config();
}
# Wake Up Service
- service: wake_up
variables: