mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	[mqtt] Fix datetime copy pasta (#6914)
This commit is contained in:
		| @@ -6,12 +6,12 @@ | |||||||
| #include "mqtt_const.h" | #include "mqtt_const.h" | ||||||
|  |  | ||||||
| #ifdef USE_MQTT | #ifdef USE_MQTT | ||||||
| #ifdef USE_DATETIME_TIME | #ifdef USE_DATETIME_DATETIME | ||||||
|  |  | ||||||
| namespace esphome { | namespace esphome { | ||||||
| namespace mqtt { | namespace mqtt { | ||||||
|  |  | ||||||
| static const char *const TAG = "mqtt.datetime.time"; | static const char *const TAG = "mqtt.datetime.datetime"; | ||||||
|  |  | ||||||
| using namespace esphome::datetime; | using namespace esphome::datetime; | ||||||
|  |  | ||||||
| @@ -80,5 +80,5 @@ bool MQTTDateTimeComponent::publish_state(uint16_t year, uint8_t month, uint8_t | |||||||
| }  // namespace mqtt | }  // namespace mqtt | ||||||
| }  // namespace esphome | }  // namespace esphome | ||||||
|  |  | ||||||
| #endif  // USE_DATETIME_TIME | #endif  // USE_DATETIME_DATETIME | ||||||
| #endif  // USE_MQTT | #endif  // USE_MQTT | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ | |||||||
| #include "esphome/core/defines.h" | #include "esphome/core/defines.h" | ||||||
|  |  | ||||||
| #ifdef USE_MQTT | #ifdef USE_MQTT | ||||||
| #ifdef USE_DATETIME_TIME | #ifdef USE_DATETIME_DATETIME | ||||||
|  |  | ||||||
| #include "esphome/components/datetime/datetime_entity.h" | #include "esphome/components/datetime/datetime_entity.h" | ||||||
| #include "mqtt_component.h" | #include "mqtt_component.h" | ||||||
| @@ -17,7 +17,7 @@ class MQTTDateTimeComponent : public mqtt::MQTTComponent { | |||||||
|    * |    * | ||||||
|    * @param time The time entity. |    * @param time The time entity. | ||||||
|    */ |    */ | ||||||
|   explicit MQTTDateTimeComponent(datetime::DateTimeEntity *time); |   explicit MQTTDateTimeComponent(datetime::DateTimeEntity *datetime); | ||||||
|  |  | ||||||
|   // ========== INTERNAL METHODS ========== |   // ========== INTERNAL METHODS ========== | ||||||
|   // (In most use cases you won't need these) |   // (In most use cases you won't need these) | ||||||
| @@ -41,5 +41,5 @@ class MQTTDateTimeComponent : public mqtt::MQTTComponent { | |||||||
| }  // namespace mqtt | }  // namespace mqtt | ||||||
| }  // namespace esphome | }  // namespace esphome | ||||||
|  |  | ||||||
| #endif  // USE_DATETIME_DATE | #endif  // USE_DATETIME_DATETIME | ||||||
| #endif  // USE_MQTT | #endif  // USE_MQTT | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user