mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-31 02:08:26 +02:00
Add support for time entities (#6399)
* Add time entities * Add tests * Add myself to datetime codeowners * Fix publishing times with 0 values * Log performing TimeCall * Implement `on_time` trigger * Rename var * Fix initial value for time * Add arg name for clarity * Remove useless checks
This commit is contained in:
@@ -34,6 +34,9 @@
|
||||
#ifdef USE_DATETIME_DATE
|
||||
#include "esphome/components/datetime/date_entity.h"
|
||||
#endif
|
||||
#ifdef USE_DATETIME_TIME
|
||||
#include "esphome/components/datetime/time_entity.h"
|
||||
#endif
|
||||
#ifdef USE_TEXT
|
||||
#include "esphome/components/text/text.h"
|
||||
#endif
|
||||
@@ -85,6 +88,9 @@ class Controller {
|
||||
#ifdef USE_DATETIME_DATE
|
||||
virtual void on_date_update(datetime::DateEntity *obj){};
|
||||
#endif
|
||||
#ifdef USE_DATETIME_TIME
|
||||
virtual void on_time_update(datetime::TimeEntity *obj){};
|
||||
#endif
|
||||
#ifdef USE_TEXT
|
||||
virtual void on_text_update(text::Text *obj, const std::string &state){};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user