Skip to content

Commit

Permalink
Fix reference
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Oct 10, 2024
1 parent 891c469 commit 830832f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/tc_bus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions components/tc_bus/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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";
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/tc_bus/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace esphome
namespace tc_bus
{
enum Model {
MODEL_GENERIC,
MODEL_NONE,
MODEL_ISH_3030
};

Expand Down

0 comments on commit 830832f

Please sign in to comment.