From eb9fffa5a31fa117470ff3e0c225209b59cbfde8 Mon Sep 17 00:00:00 2001 From: CptSkippy Date: Sat, 1 Jun 2024 15:48:30 -0700 Subject: [PATCH] Fixing function reference. --- esphome/components/ld2415h/__init__.py | 2 +- esphome/components/ld2415h/ld2415h.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/ld2415h/__init__.py b/esphome/components/ld2415h/__init__.py index 290e4c7bcb..71c29f711e 100644 --- a/esphome/components/ld2415h/__init__.py +++ b/esphome/components/ld2415h/__init__.py @@ -14,7 +14,7 @@ LD2415HComponent = ld2415h_ns.class_("LD2415HComponent", cg.Component, uart.UART CONF_LD2415H_ID = "ld2415h_id" -CONFIG_SCHEMA = ( +CONFIG_SCHEMA = cv.All( cv.Schema( { cv.GenerateID(): cv.declare_id(LD2415HComponent), diff --git a/esphome/components/ld2415h/ld2415h.cpp b/esphome/components/ld2415h/ld2415h.cpp index 57381fc94d..0b295c2448 100644 --- a/esphome/components/ld2415h/ld2415h.cpp +++ b/esphome/components/ld2415h/ld2415h.cpp @@ -33,8 +33,8 @@ void LD2415HComponent::setup() { this->relay_trigger_speed_number_->publish_state(this->relay_trigger_speed_); #endif #ifdef USE_SELECT - this->sample_rate_selector_->publish_state(i_to_s_(SAMPLE_RATE_STR_TO_INT, this->sample_rate_)); - this->tracking_mode_selector_->publish_state(i_to_s_(TRACKING_MODE_STR_TO_INT, this->tracking_mode_)); + this->sample_rate_selector_->publish_state(this->i_to_s_(SAMPLE_RATE_STR_TO_INT, this->sample_rate_)); + this->tracking_mode_selector_->publish_state(this->i_to_s_(TRACKING_MODE_STR_TO_INT, this->tracking_mode_)); #endif } @@ -446,7 +446,7 @@ const char *LD2415HComponent::negotiation_mode_to_s_(NegotiationMode value) { } } -const char *i_to_s(const std::map &map, uint8_t i) { +const char *LD2415HComponent::i_to_s_(const std::map &map, uint8_t i) { for (const auto &pair : map) { if (pair.second == i) { return pair.first.c_str();