1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-24 12:43:51 +01:00
This commit is contained in:
J. Nick Koston
2025-10-15 23:17:08 -10:00
parent baf117b411
commit febe075bb2
4 changed files with 33 additions and 46 deletions

View File

@@ -30,12 +30,14 @@ class DateTimeBase : public EntityBase {
#endif
};
#ifdef USE_TIME
class DateTimeStateTrigger : public Trigger<ESPTime> {
public:
explicit DateTimeStateTrigger(DateTimeBase *parent) {
parent->add_on_state_callback([this, parent]() { this->trigger(parent->state_as_esptime()); });
}
};
#endif
} // namespace datetime
} // namespace esphome