@@ -101,7 +101,7 @@ static void gdo_event_handler(const gdo_status_t *status, gdo_cb_event_t event,
101
101
case GDO_CB_EVENT_SET_TTC:
102
102
ESP_LOGI (TAG, " Set Time to close: %d" , status->ttc_seconds );
103
103
break ;
104
- case GDO_CB_EVENT_CANCLE_TTC :
104
+ case GDO_CB_EVENT_CANCEL_TTC :
105
105
ESP_LOGI (TAG, " Cancle Time to close: %d" , status->ttc_seconds );
106
106
break ;
107
107
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,
118
118
status->paired_devices .total_accessories ,
119
119
status->paired_devices .total_all );
120
120
break ;
121
- case GDO_CB_EVENT_OPEN_DURATION_MEASURMENT :
121
+ case GDO_CB_EVENT_OPEN_DURATION_MEASUREMENT :
122
122
ESP_LOGI (TAG, " Open duration: %d" , status->open_ms );
123
123
gdo->set_open_duration (status->open_ms );
124
124
break ;
125
- case GDO_CB_EVENT_CLOSE_DURATION_MEASURMENT :
125
+ case GDO_CB_EVENT_CLOSE_DURATION_MEASUREMENT :
126
126
ESP_LOGI (TAG, " Close duration: %d" , status->close_ms );
127
127
gdo->set_close_duration (status->close_ms );
128
128
break ;
@@ -133,14 +133,14 @@ static void gdo_event_handler(const gdo_status_t *status, gdo_cb_event_t event,
133
133
}
134
134
135
135
void GDOComponent::setup () {
136
- #ifdef GDO_TOGGLE_ONLY
136
+ #ifdef GDO_TOGGLE_ONLY
137
137
// Set the toggle only state and control here because we cannot guarantee the
138
138
// cover instance was created before the switch
139
139
this ->door_ ->set_toggle_only (this ->toggle_only_switch_ ->state );
140
140
this ->toggle_only_switch_ ->set_control_function (
141
141
std::bind (&esphome::secplus_gdo::GDODoor::set_toggle_only, this ->door_ ,
142
142
std::placeholders::_1));
143
- #endif
143
+ #endif
144
144
gdo_config_t gdo_conf = {
145
145
.uart_num = UART_NUM_1,
146
146
.obst_from_status = GDO_OBST_FROM_STATE,
@@ -163,7 +163,6 @@ void GDOComponent::setup() {
163
163
.rf_rx_pin = (gpio_num_t )-1 ,
164
164
#endif
165
165
};
166
-
167
166
gdo_init (&gdo_conf);
168
167
gdo_get_status (&this ->status_ );
169
168
gdo_start (gdo_event_handler, this );
0 commit comments