update "Can't convert" warning to match others in homeassistant_sensor (#5162)

This commit is contained in:
PlainTechEnthusiast 2023-07-30 17:40:55 -04:00 committed by Jesse Hills
parent 91e920c498
commit 2a12ec09fb
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -12,7 +12,7 @@ void HomeassistantSensor::setup() {
this->entity_id_, this->attribute_, [this](const std::string &state) {
auto val = parse_number<float>(state);
if (!val.has_value()) {
ESP_LOGW(TAG, "Can't convert '%s' to number!", state.c_str());
ESP_LOGW(TAG, "'%s': Can't convert '%s' to number!", this->entity_id_.c_str(), state.c_str());
this->publish_state(NAN);
return;
}