diff --git a/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp b/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp index abb14dd..3820dd2 100644 --- a/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp +++ b/components/ratgdo/binary_sensor/ratgdo_binary_sensor.cpp @@ -23,7 +23,7 @@ namespace ratgdo { } else if (this->binary_sensor_type_ == SensorType::RATGDO_SENSOR_MOTOR) { ESP_LOGCONFIG(TAG, " Type: Motor"); } else if (this->binary_sensor_type_ == SensorType::RATGDO_SENSOR_BUTTON) { - ESP_LOGCONFIG(TAG, " Type: Button"); + ESP_LOGCONFIG(TAG, " Type: Button"); } } void RATGDOBinarySensor::on_motion_state(MotionState state) @@ -53,7 +53,7 @@ namespace ratgdo { return; ESP_LOGD(TAG, "name: %s this->type_:%d on_button_state: %d", this->get_name(), this->binary_sensor_type_, state); this->publish_state(state == ButtonState::BUTTON_STATE_PRESSED); - } + } } // namespace ratgdo } // namespace esphome diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 16a3a53..4c12ba2 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -112,8 +112,7 @@ namespace ratgdo { } else if (cmd == 0x284) { motor = 1; } else if (cmd == 0x280) { - button = bytes1 == 1 - ESP_LOGD(TAG, "Pressed: %s", byte1 == 1 ? "pressed" : "released"); + button = bytes1 == 1 ESP_LOGD(TAG, "Pressed: %s", byte1 == 1 ? "pressed" : "released"); } else if (cmd == 0x48c) { openings = (byte1 << 8) | byte2; ESP_LOGD(TAG, "Openings: %d", (byte1 << 8) | byte2); diff --git a/components/ratgdo/ratgdo_state.cpp b/components/ratgdo/ratgdo_state.cpp index d985e82..68f2c08 100644 --- a/components/ratgdo/ratgdo_state.cpp +++ b/components/ratgdo/ratgdo_state.cpp @@ -98,7 +98,7 @@ namespace ratgdo { default: return "UNKNOWN"; } - } + } } // namespace ratgdo } // namespace esphome