mirror of
https://github.com/esphome/esphome.git
synced 2025-09-01 10:52:19 +01:00
Add datetime entities (#6513)
This commit is contained in:
@@ -183,3 +183,25 @@ datetime:
|
||||
- x.hour
|
||||
- x.minute
|
||||
- x.second
|
||||
- platform: template
|
||||
name: DateTime
|
||||
id: test_datetime
|
||||
type: datetime
|
||||
set_action:
|
||||
- logger.log: "set_value"
|
||||
on_value:
|
||||
- logger.log:
|
||||
format: "DateTime: %04d-%02d-%02d %02d:%02d:%02d"
|
||||
args:
|
||||
- x.year
|
||||
- x.month
|
||||
- x.day_of_month
|
||||
- x.hour
|
||||
- x.minute
|
||||
- x.second
|
||||
|
||||
time:
|
||||
- platform: sntp # Required for datetime
|
||||
|
||||
wifi: # Required for sntp time
|
||||
ap:
|
2
tests/components/template/test.bk72xx.yaml
Normal file
2
tests/components/template/test.bk72xx.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/template/test.esp32-c3-idf.yaml
Normal file
2
tests/components/template/test.esp32-c3-idf.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/template/test.esp32-c3.yaml
Normal file
2
tests/components/template/test.esp32-c3.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/template/test.esp32-idf.yaml
Normal file
2
tests/components/template/test.esp32-idf.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/template/test.esp32-s3-idf.yaml
Normal file
2
tests/components/template/test.esp32-s3-idf.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/template/test.esp32.yaml
Normal file
2
tests/components/template/test.esp32.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/template/test.esp8266.yaml
Normal file
2
tests/components/template/test.esp8266.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
2
tests/components/template/test.rp2040.yaml
Normal file
2
tests/components/template/test.rp2040.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
packages:
|
||||
common: !include common.yaml
|
Reference in New Issue
Block a user