Skip to content

Commit dc00f29

Browse files
Typos and Load Priority
1 parent d8bc919 commit dc00f29

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

components/secplus_gdo/binary_sensor/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"obstruction": "register_obstruction",
3737
"motor": "register_motor",
3838
"button": "register_button",
39-
"sync": "register_sync",
39+
"sync": "register_sync",
4040
}
4141

4242

components/secplus_gdo/secplus_gdo.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static void gdo_event_handler(const gdo_status_t *status, gdo_cb_event_t event,
101101
case GDO_CB_EVENT_SET_TTC:
102102
ESP_LOGI(TAG, "Set Time to close: %d", status->ttc_seconds);
103103
break;
104-
case GDO_CB_EVENT_CANCLE_TTC:
104+
case GDO_CB_EVENT_CANCEL_TTC:
105105
ESP_LOGI(TAG, "Cancle Time to close: %d", status->ttc_seconds);
106106
break;
107107
case GDO_CB_EVENT_UPDATE_TTC:
@@ -118,11 +118,11 @@ static void gdo_event_handler(const gdo_status_t *status, gdo_cb_event_t event,
118118
status->paired_devices.total_accessories,
119119
status->paired_devices.total_all);
120120
break;
121-
case GDO_CB_EVENT_OPEN_DURATION_MEASURMENT:
121+
case GDO_CB_EVENT_OPEN_DURATION_MEASUREMENT:
122122
ESP_LOGI(TAG, "Open duration: %d", status->open_ms);
123123
gdo->set_open_duration(status->open_ms);
124124
break;
125-
case GDO_CB_EVENT_CLOSE_DURATION_MEASURMENT:
125+
case GDO_CB_EVENT_CLOSE_DURATION_MEASUREMENT:
126126
ESP_LOGI(TAG, "Close duration: %d", status->close_ms);
127127
gdo->set_close_duration(status->close_ms);
128128
break;
@@ -133,14 +133,14 @@ static void gdo_event_handler(const gdo_status_t *status, gdo_cb_event_t event,
133133
}
134134

135135
void GDOComponent::setup() {
136-
#ifdef GDO_TOGGLE_ONLY
136+
#ifdef GDO_TOGGLE_ONLY
137137
// Set the toggle only state and control here because we cannot guarantee the
138138
// cover instance was created before the switch
139139
this->door_->set_toggle_only(this->toggle_only_switch_->state);
140140
this->toggle_only_switch_->set_control_function(
141141
std::bind(&esphome::secplus_gdo::GDODoor::set_toggle_only, this->door_,
142142
std::placeholders::_1));
143-
#endif
143+
#endif
144144
gdo_config_t gdo_conf = {
145145
.uart_num = UART_NUM_1,
146146
.obst_from_status = GDO_OBST_FROM_STATE,
@@ -163,7 +163,6 @@ void GDOComponent::setup() {
163163
.rf_rx_pin = (gpio_num_t)-1,
164164
#endif
165165
};
166-
167166
gdo_init(&gdo_conf);
168167
gdo_get_status(&this->status_);
169168
gdo_start(gdo_event_handler, this);

components/secplus_gdo/secplus_gdo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class GDOComponent : public Component {
3939
void start_gdo() { start_gdo_ = true; }
4040
// Use Late priority so we do not start the GDO lib until all saved
4141
// preferences are loaded
42-
float get_setup_priority() const override { return setup_priority::LATE; }
42+
float get_setup_priority() const override { return setup_priority::BEFORE_CONNECTION; }
4343

4444
void register_protocol_select(GDOSelect *select) {
4545
this->protocol_select_ = select;

0 commit comments

Comments
 (0)