Move time server IP to secrets
Mostly not because it's "secret" but to make templates reusable.
This commit is contained in:
@@ -7,9 +7,11 @@ esphome:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
device_base: !include templates/mystrom.yaml
|
device_base: !include templates/mystrom.yaml
|
||||||
|
time: !include templates/time.yaml
|
||||||
|
|
||||||
time:
|
time:
|
||||||
- platform: sntp
|
- platform: sntp
|
||||||
|
id: sntp_time
|
||||||
servers: !secret sntp_servers
|
servers: !secret sntp_servers
|
||||||
on_time:
|
on_time:
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ esphome:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
device_base: !include templates/mystrom.yaml
|
device_base: !include templates/mystrom.yaml
|
||||||
|
time: !include templates/time.yaml
|
||||||
|
|
||||||
time:
|
time:
|
||||||
- platform: sntp
|
- platform: sntp
|
||||||
|
id: sntp_time
|
||||||
servers: !secret sntp_servers
|
servers: !secret sntp_servers
|
||||||
on_time:
|
on_time:
|
||||||
# Heating schedule is 5AM to 8PM. Judging by the burner state, it means that
|
# Heating schedule is 5AM to 8PM. Judging by the burner state, it means that
|
||||||
|
|||||||
+2
-1
@@ -11,6 +11,7 @@ external_components:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
device_base: !include esp32-poe.yaml
|
device_base: !include esp32-poe.yaml
|
||||||
|
time: !include time.yaml
|
||||||
|
|
||||||
button:
|
button:
|
||||||
- platform: factory_reset
|
- platform: factory_reset
|
||||||
@@ -19,7 +20,7 @@ button:
|
|||||||
|
|
||||||
time:
|
time:
|
||||||
- platform: sntp
|
- platform: sntp
|
||||||
servers: [eye]
|
servers: !secret sntp_servers
|
||||||
id: sntp_time
|
id: sntp_time
|
||||||
|
|
||||||
lock:
|
lock:
|
||||||
|
|||||||
@@ -7,3 +7,5 @@ lock_pin: 314
|
|||||||
wifi_ap_lookup:
|
wifi_ap_lookup:
|
||||||
- "12:34:56:AB:CD -> Upper Floor AP"
|
- "12:34:56:AB:CD -> Upper Floor AP"
|
||||||
api_encryption_key: "K3g+SB5OYgLxKtEXhWJd1Mryfy9hGol+mAq+nq/JDsY="
|
api_encryption_key: "K3g+SB5OYgLxKtEXhWJd1Mryfy9hGol+mAq+nq/JDsY="
|
||||||
|
sntp_servers:
|
||||||
|
- pool.ntp.org
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
binary_sensor:
|
||||||
|
- platform: template
|
||||||
|
name: "Device clock invalid"
|
||||||
|
lambda: 'return !id(sntp_time).now().is_valid();'
|
||||||
|
entity_category: diagnostic
|
||||||
|
device_class: problem
|
||||||
Reference in New Issue
Block a user