mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-19 20:53:26 +02:00
Add datetime entities (#6513)
This commit is contained in:
@@ -40,10 +40,13 @@ void DateCall::validate_() {
|
||||
if (this->year_.has_value() && (this->year_ < 1970 || this->year_ > 3000)) {
|
||||
ESP_LOGE(TAG, "Year must be between 1970 and 3000");
|
||||
this->year_.reset();
|
||||
this->month_.reset();
|
||||
this->day_.reset();
|
||||
}
|
||||
if (this->month_.has_value() && (this->month_ < 1 || this->month_ > 12)) {
|
||||
ESP_LOGE(TAG, "Month must be between 1 and 12");
|
||||
this->month_.reset();
|
||||
this->day_.reset();
|
||||
}
|
||||
if (this->day_.has_value()) {
|
||||
uint16_t year = 0;
|
||||
|
||||
Reference in New Issue
Block a user