From 3841c8e6510864348acc61d6264583ef44e87bc0 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 27 Jan 2026 17:36:58 -1000 Subject: [PATCH] fix tag --- esphome/components/binary_sensor/binary_sensor.cpp | 2 +- esphome/components/button/button.cpp | 2 +- esphome/components/cover/cover.h | 2 +- esphome/components/datetime/date_entity.h | 2 +- esphome/components/datetime/datetime_entity.h | 2 +- esphome/components/datetime/time_entity.h | 2 +- esphome/components/event/event.h | 4 ++-- esphome/components/lock/lock.h | 2 +- esphome/components/number/number.cpp | 6 +++--- esphome/components/select/select.h | 2 +- esphome/components/sensor/sensor.cpp | 4 ++-- esphome/components/switch/switch.cpp | 4 ++-- esphome/components/text/text.h | 2 +- esphome/components/text_sensor/text_sensor.cpp | 4 ++-- esphome/components/valve/valve.h | 2 +- esphome/core/entity_base.h | 6 +++--- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/esphome/components/binary_sensor/binary_sensor.cpp b/esphome/components/binary_sensor/binary_sensor.cpp index cd9120c848..7c3b06970d 100644 --- a/esphome/components/binary_sensor/binary_sensor.cpp +++ b/esphome/components/binary_sensor/binary_sensor.cpp @@ -14,7 +14,7 @@ void log_binary_sensor(const char *tag, const char *prefix, const char *type, Bi } ESP_LOGCONFIG(tag, "%s%s '%s'", prefix, type, obj->get_name().c_str()); - LOG_ENTITY_DEVICE_CLASS(prefix, *obj); + LOG_ENTITY_DEVICE_CLASS(tag, prefix, *obj); } void BinarySensor::publish_state(bool new_state) { diff --git a/esphome/components/button/button.cpp b/esphome/components/button/button.cpp index 89a4eda5cd..8c06cfe59b 100644 --- a/esphome/components/button/button.cpp +++ b/esphome/components/button/button.cpp @@ -12,7 +12,7 @@ void log_button(const char *tag, const char *prefix, const char *type, Button *o } ESP_LOGCONFIG(tag, "%s%s '%s'", prefix, type, obj->get_name().c_str()); - LOG_ENTITY_ICON(prefix, *obj); + LOG_ENTITY_ICON(tag, prefix, *obj); } void Button::press() { diff --git a/esphome/components/cover/cover.h b/esphome/components/cover/cover.h index a2a0cc7aa8..e5427ceaa8 100644 --- a/esphome/components/cover/cover.h +++ b/esphome/components/cover/cover.h @@ -20,7 +20,7 @@ const extern float COVER_CLOSED; if (traits_.get_is_assumed_state()) { \ ESP_LOGCONFIG(TAG, "%s Assumed State: YES", prefix); \ } \ - LOG_ENTITY_DEVICE_CLASS(prefix, *(obj)); \ + LOG_ENTITY_DEVICE_CLASS(TAG, prefix, *(obj)); \ } class Cover; diff --git a/esphome/components/datetime/date_entity.h b/esphome/components/datetime/date_entity.h index 2892c7b920..cbf2b85506 100644 --- a/esphome/components/datetime/date_entity.h +++ b/esphome/components/datetime/date_entity.h @@ -15,7 +15,7 @@ namespace esphome::datetime { #define LOG_DATETIME_DATE(prefix, type, obj) \ if ((obj) != nullptr) { \ ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \ - LOG_ENTITY_ICON(prefix, *(obj)); \ + LOG_ENTITY_ICON(TAG, prefix, *(obj)); \ } class DateCall; diff --git a/esphome/components/datetime/datetime_entity.h b/esphome/components/datetime/datetime_entity.h index b3c2563b49..b1b8a77846 100644 --- a/esphome/components/datetime/datetime_entity.h +++ b/esphome/components/datetime/datetime_entity.h @@ -15,7 +15,7 @@ namespace esphome::datetime { #define LOG_DATETIME_DATETIME(prefix, type, obj) \ if ((obj) != nullptr) { \ ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \ - LOG_ENTITY_ICON(prefix, *(obj)); \ + LOG_ENTITY_ICON(TAG, prefix, *(obj)); \ } class DateTimeCall; diff --git a/esphome/components/datetime/time_entity.h b/esphome/components/datetime/time_entity.h index 8159c35ee9..3f224684bb 100644 --- a/esphome/components/datetime/time_entity.h +++ b/esphome/components/datetime/time_entity.h @@ -15,7 +15,7 @@ namespace esphome::datetime { #define LOG_DATETIME_TIME(prefix, type, obj) \ if ((obj) != nullptr) { \ ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \ - LOG_ENTITY_ICON(prefix, *(obj)); \ + LOG_ENTITY_ICON(TAG, prefix, *(obj)); \ } class TimeCall; diff --git a/esphome/components/event/event.h b/esphome/components/event/event.h index a92b4b79d8..a7451407bb 100644 --- a/esphome/components/event/event.h +++ b/esphome/components/event/event.h @@ -16,8 +16,8 @@ namespace event { #define LOG_EVENT(prefix, type, obj) \ if ((obj) != nullptr) { \ ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \ - LOG_ENTITY_ICON(prefix, *(obj)); \ - LOG_ENTITY_DEVICE_CLASS(prefix, *(obj)); \ + LOG_ENTITY_ICON(TAG, prefix, *(obj)); \ + LOG_ENTITY_DEVICE_CLASS(TAG, prefix, *(obj)); \ } class Event : public EntityBase, public EntityBase_DeviceClass { diff --git a/esphome/components/lock/lock.h b/esphome/components/lock/lock.h index 55b4e7eebe..69fc405713 100644 --- a/esphome/components/lock/lock.h +++ b/esphome/components/lock/lock.h @@ -14,7 +14,7 @@ class Lock; #define LOG_LOCK(prefix, type, obj) \ if ((obj) != nullptr) { \ ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \ - LOG_ENTITY_ICON(prefix, *(obj)); \ + LOG_ENTITY_ICON(TAG, prefix, *(obj)); \ if ((obj)->traits.get_assumed_state()) { \ ESP_LOGCONFIG(TAG, "%s Assumed State: YES", prefix); \ } \ diff --git a/esphome/components/number/number.cpp b/esphome/components/number/number.cpp index 7b335f5412..1c4126496c 100644 --- a/esphome/components/number/number.cpp +++ b/esphome/components/number/number.cpp @@ -14,9 +14,9 @@ void log_number(const char *tag, const char *prefix, const char *type, Number *o } ESP_LOGCONFIG(tag, "%s%s '%s'", prefix, type, obj->get_name().c_str()); - LOG_ENTITY_ICON(prefix, *obj); - LOG_ENTITY_UNIT_OF_MEASUREMENT(prefix, obj->traits); - LOG_ENTITY_DEVICE_CLASS(prefix, obj->traits); + LOG_ENTITY_ICON(tag, prefix, *obj); + LOG_ENTITY_UNIT_OF_MEASUREMENT(tag, prefix, obj->traits); + LOG_ENTITY_DEVICE_CLASS(tag, prefix, obj->traits); } void Number::publish_state(float state) { diff --git a/esphome/components/select/select.h b/esphome/components/select/select.h index 4028e4cf72..c91acd1e19 100644 --- a/esphome/components/select/select.h +++ b/esphome/components/select/select.h @@ -12,7 +12,7 @@ namespace esphome::select { #define LOG_SELECT(prefix, type, obj) \ if ((obj) != nullptr) { \ ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \ - LOG_ENTITY_ICON(prefix, *(obj)); \ + LOG_ENTITY_ICON(TAG, prefix, *(obj)); \ } #define SUB_SELECT(name) \ diff --git a/esphome/components/sensor/sensor.cpp b/esphome/components/sensor/sensor.cpp index d6fc7f3c0a..3f2be02af2 100644 --- a/esphome/components/sensor/sensor.cpp +++ b/esphome/components/sensor/sensor.cpp @@ -22,8 +22,8 @@ void log_sensor(const char *tag, const char *prefix, const char *type, Sensor *o LOG_STR_ARG(state_class_to_string(obj->get_state_class())), prefix, obj->get_unit_of_measurement_ref().c_str(), prefix, obj->get_accuracy_decimals()); - LOG_ENTITY_DEVICE_CLASS(prefix, *obj); - LOG_ENTITY_ICON(prefix, *obj); + LOG_ENTITY_DEVICE_CLASS(tag, prefix, *obj); + LOG_ENTITY_ICON(tag, prefix, *obj); if (obj->get_force_update()) { ESP_LOGV(tag, "%s Force Update: YES", prefix); diff --git a/esphome/components/switch/switch.cpp b/esphome/components/switch/switch.cpp index e9b27b3682..61a273d25c 100644 --- a/esphome/components/switch/switch.cpp +++ b/esphome/components/switch/switch.cpp @@ -96,14 +96,14 @@ void log_switch(const char *tag, const char *prefix, const char *type, Switch *o LOG_STR_ARG(onoff)); // Add optional fields separately - LOG_ENTITY_ICON(prefix, *obj); + LOG_ENTITY_ICON(tag, prefix, *obj); if (obj->assumed_state()) { ESP_LOGCONFIG(tag, "%s Assumed State: YES", prefix); } if (obj->is_inverted()) { ESP_LOGCONFIG(tag, "%s Inverted: YES", prefix); } - LOG_ENTITY_DEVICE_CLASS(prefix, *obj); + LOG_ENTITY_DEVICE_CLASS(tag, prefix, *obj); } } diff --git a/esphome/components/text/text.h b/esphome/components/text/text.h index c1b6554d51..3a1bea56cb 100644 --- a/esphome/components/text/text.h +++ b/esphome/components/text/text.h @@ -12,7 +12,7 @@ namespace text { #define LOG_TEXT(prefix, type, obj) \ if ((obj) != nullptr) { \ ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \ - LOG_ENTITY_ICON(prefix, *(obj)); \ + LOG_ENTITY_ICON(TAG, prefix, *(obj)); \ } /** Base-class for all text inputs. diff --git a/esphome/components/text_sensor/text_sensor.cpp b/esphome/components/text_sensor/text_sensor.cpp index 559685ebe6..c48bdf4b82 100644 --- a/esphome/components/text_sensor/text_sensor.cpp +++ b/esphome/components/text_sensor/text_sensor.cpp @@ -15,8 +15,8 @@ void log_text_sensor(const char *tag, const char *prefix, const char *type, Text } ESP_LOGCONFIG(tag, "%s%s '%s'", prefix, type, obj->get_name().c_str()); - LOG_ENTITY_DEVICE_CLASS(prefix, *obj); - LOG_ENTITY_ICON(prefix, *obj); + LOG_ENTITY_DEVICE_CLASS(tag, prefix, *obj); + LOG_ENTITY_ICON(tag, prefix, *obj); } void TextSensor::publish_state(const std::string &state) { this->publish_state(state.data(), state.size()); } diff --git a/esphome/components/valve/valve.h b/esphome/components/valve/valve.h index c887527fb8..cd46144372 100644 --- a/esphome/components/valve/valve.h +++ b/esphome/components/valve/valve.h @@ -20,7 +20,7 @@ const extern float VALVE_CLOSED; if (traits_.get_is_assumed_state()) { \ ESP_LOGCONFIG(TAG, "%s Assumed State: YES", prefix); \ } \ - LOG_ENTITY_DEVICE_CLASS(prefix, *(obj)); \ + LOG_ENTITY_DEVICE_CLASS(TAG, prefix, *(obj)); \ } class Valve; diff --git a/esphome/core/entity_base.h b/esphome/core/entity_base.h index b37b7b0d0e..86cb75495b 100644 --- a/esphome/core/entity_base.h +++ b/esphome/core/entity_base.h @@ -231,13 +231,13 @@ class EntityBase_UnitOfMeasurement { // NOLINT(readability-identifier-naming) }; /// Log entity icon if set (for use in dump_config) -#define LOG_ENTITY_ICON(prefix, obj) log_entity_icon(TAG, prefix, obj) +#define LOG_ENTITY_ICON(tag, prefix, obj) log_entity_icon(tag, prefix, obj) void log_entity_icon(const char *tag, const char *prefix, const EntityBase &obj); /// Log entity device class if set (for use in dump_config) -#define LOG_ENTITY_DEVICE_CLASS(prefix, obj) log_entity_device_class(TAG, prefix, obj) +#define LOG_ENTITY_DEVICE_CLASS(tag, prefix, obj) log_entity_device_class(tag, prefix, obj) void log_entity_device_class(const char *tag, const char *prefix, const EntityBase_DeviceClass &obj); /// Log entity unit of measurement if set (for use in dump_config) -#define LOG_ENTITY_UNIT_OF_MEASUREMENT(prefix, obj) log_entity_unit_of_measurement(TAG, prefix, obj) +#define LOG_ENTITY_UNIT_OF_MEASUREMENT(tag, prefix, obj) log_entity_unit_of_measurement(tag, prefix, obj) void log_entity_unit_of_measurement(const char *tag, const char *prefix, const EntityBase_UnitOfMeasurement &obj); /**