mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-29 22:24:26 +00:00 
			
		
		
		
	[datetime] Fix DateTimeStateTrigger compilation when time component is not used (#11287)
This commit is contained in:
		| @@ -30,14 +30,12 @@ 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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user