Home Assistant Time Source
The preferred way to get time in ESPHome is using Home Assistant.
With the homeassistant time platform, the native API connection
to Home Assistant will be used to periodically synchronize the current time.
NOTE
Although you might not plan to export states from the node and you do not need an entity of the node in Home Assistant, this component still requires you to register the node under Home Assistant. See: Connecting your device to Home Assistant.
# Example configuration entrytime: - platform: homeassistant id: homeassistant_timeIf no timezone is configured for this component, an initial timezone will be inferred from the build host, but
at runtime the timezone will be updated from Home Assistant when the time is synced.
An explicitly configured timezone will prevent the timezone from being updated from Home Assistant.
Configuration variables
Section titled “Configuration variables”- All options from Base Time Configuration.