Home Assistant 时间源
在 ESPHome 中获取时间的首选方法是使用 Home Assistant。使用 homeassistant 时间平台,与 Home Assistant 的 原生 API 连接将用于定期同步当前时间。
NOTE
虽然您可能不打算从节点导出状态,也不需要在 Home Assistant 中有节点的实体,但此组件仍然需要您在 Home Assistant 下注册节点。请参阅:将您的设备连接到 Home Assistant。
# 示例配置条目time: - platform: homeassistant id: homeassistant_time- 基本时间配置的所有选项。