From 830832fd081c09fe2f6b4cb87168e8ba00462916 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 10 Oct 2024 12:41:14 +0200 Subject: [PATCH] Fix reference --- components/tc_bus/__init__.py | 4 ++-- components/tc_bus/protocol.cpp | 4 ++-- components/tc_bus/protocol.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/tc_bus/__init__.py b/components/tc_bus/__init__.py index 745ebd7..c27abe1 100644 --- a/components/tc_bus/__init__.py +++ b/components/tc_bus/__init__.py @@ -74,7 +74,7 @@ Model = tc_bus_ns.enum("Model") MODELS = { - "generic": Model.MODEL_GENERIC, + "none": Model.MODEL_NONE, "ish_3030": Model.MODEL_ISH_3030, } @@ -115,7 +115,7 @@ def validate_config(config): cv.GenerateID(): cv.declare_id(TCBus), cv.Optional(CONF_RX_PIN, default=9): pins.internal_gpio_input_pin_schema, cv.Optional(CONF_TX_PIN, default=8): pins.internal_gpio_output_pin_schema, - cv.Optional(CONF_MODEL, default="generic"): cv.enum(MODELS, upper=False), + cv.Optional(CONF_MODEL, default="none"): cv.enum(MODELS, upper=False), cv.Optional(CONF_EVENT, default="tc"): cv.string, cv.Optional(CONF_SERIAL_NUMBER, default=0): cv.hex_uint32_t, cv.Optional(CONF_SERIAL_NUMBER_LAMBDA): cv.returning_lambda, diff --git a/components/tc_bus/protocol.cpp b/components/tc_bus/protocol.cpp index 1017e55..144bca1 100644 --- a/components/tc_bus/protocol.cpp +++ b/components/tc_bus/protocol.cpp @@ -345,7 +345,7 @@ namespace esphome { //if (str == "ISH_3030") return MODEL_ISH_3030; - return MODEL_GENERIC; + return MODEL_NONE; } SettingType string_to_setting_type(char* str) @@ -437,7 +437,7 @@ namespace esphome { switch (model) { - case COMMAND_TYPE_ISH_3030: return "ISH_3030"; + case MODEL_ISH_3030: return "ISH_3030"; default: return "GENERIC"; } } diff --git a/components/tc_bus/protocol.h b/components/tc_bus/protocol.h index 16e1d1e..7b68756 100644 --- a/components/tc_bus/protocol.h +++ b/components/tc_bus/protocol.h @@ -7,7 +7,7 @@ namespace esphome namespace tc_bus { enum Model { - MODEL_GENERIC, + MODEL_NONE, MODEL_ISH_3030 };