[datetime] Fix state_as_esptime() returning invalid timestamp (#15128)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2026-03-24 14:03:56 -10:00
1 parent b6aec4fa25
commit f457b995f7
4 files changed
+71 -8

No files matched your search

@@ -60,6 +60,9 @@ ESPTime DateTimeEntity::state_as_esptime() const {
obj.year = this->year_;
obj.month = this->month_;
obj.day_of_month = this->day_;
obj.day_of_week = 0;
obj.day_of_year = 0;
obj.is_dst = false;
obj.hour = this->hour_;
obj.minute = this->minute_;
obj.second = this->second_;