remove excess debug
This commit is contained in:
parent
2f6c90b50f
commit
a924f2335b
|
@ -30,28 +30,24 @@ namespace ratgdo {
|
||||||
{
|
{
|
||||||
if (this->binary_sensor_type_ != SensorType::RATGDO_SENSOR_MOTION)
|
if (this->binary_sensor_type_ != SensorType::RATGDO_SENSOR_MOTION)
|
||||||
return;
|
return;
|
||||||
ESP_LOGD(TAG, "name: %s this->type_:%d on_motion_state: %d", this->get_name(), this->binary_sensor_type_, state);
|
|
||||||
this->publish_state(state == MotionState::MOTION_STATE_DETECTED);
|
this->publish_state(state == MotionState::MOTION_STATE_DETECTED);
|
||||||
}
|
}
|
||||||
void RATGDOBinarySensor::on_obstruction_state(ObstructionState state)
|
void RATGDOBinarySensor::on_obstruction_state(ObstructionState state)
|
||||||
{
|
{
|
||||||
if (this->binary_sensor_type_ != SensorType::RATGDO_SENSOR_OBSTRUCTION)
|
if (this->binary_sensor_type_ != SensorType::RATGDO_SENSOR_OBSTRUCTION)
|
||||||
return;
|
return;
|
||||||
ESP_LOGD(TAG, "name: %s this->type_:%d on_obstruction_state: %d", this->get_name(), this->binary_sensor_type_, state);
|
|
||||||
this->publish_state(state == ObstructionState::OBSTRUCTION_STATE_OBSTRUCTED);
|
this->publish_state(state == ObstructionState::OBSTRUCTION_STATE_OBSTRUCTED);
|
||||||
}
|
}
|
||||||
void RATGDOBinarySensor::on_motor_state(MotorState state)
|
void RATGDOBinarySensor::on_motor_state(MotorState state)
|
||||||
{
|
{
|
||||||
if (this->binary_sensor_type_ != SensorType::RATGDO_SENSOR_MOTOR)
|
if (this->binary_sensor_type_ != SensorType::RATGDO_SENSOR_MOTOR)
|
||||||
return;
|
return;
|
||||||
ESP_LOGD(TAG, "name: %s this->type_:%d on_motor_state: %d", this->get_name(), this->binary_sensor_type_, state);
|
|
||||||
this->publish_state(state == MotorState::MOTOR_STATE_ON);
|
this->publish_state(state == MotorState::MOTOR_STATE_ON);
|
||||||
}
|
}
|
||||||
void RATGDOBinarySensor::on_button_state(ButtonState state)
|
void RATGDOBinarySensor::on_button_state(ButtonState state)
|
||||||
{
|
{
|
||||||
if (this->binary_sensor_type_ != SensorType::RATGDO_SENSOR_BUTTON)
|
if (this->binary_sensor_type_ != SensorType::RATGDO_SENSOR_BUTTON)
|
||||||
return;
|
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);
|
this->publish_state(state == ButtonState::BUTTON_STATE_PRESSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ namespace ratgdo {
|
||||||
|
|
||||||
void RATGDOButton::press_action()
|
void RATGDOButton::press_action()
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "name: %s this->type_:%d", this->get_name(), this->button_type_);
|
|
||||||
if (this->button_type_ == ButtonType::RATGDO_SYNC) {
|
if (this->button_type_ == ButtonType::RATGDO_SYNC) {
|
||||||
this->parent_->sync();
|
this->parent_->sync();
|
||||||
} else if (this->button_type_ == ButtonType::RATGDO_QUERY) {
|
} else if (this->button_type_ == ButtonType::RATGDO_QUERY) {
|
||||||
|
|
|
@ -15,7 +15,6 @@ namespace ratgdo {
|
||||||
}
|
}
|
||||||
void RATGDOLightOutput::on_light_state(esphome::ratgdo::LightState state)
|
void RATGDOLightOutput::on_light_state(esphome::ratgdo::LightState state)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "on_light_state: %d", state);
|
|
||||||
if (this->light_state_) {
|
if (this->light_state_) {
|
||||||
this->has_initial_state_ = true;
|
this->has_initial_state_ = true;
|
||||||
set_state(state);
|
set_state(state);
|
||||||
|
@ -32,7 +31,6 @@ namespace ratgdo {
|
||||||
void RATGDOLightOutput::setup_state(light::LightState* light_state)
|
void RATGDOLightOutput::setup_state(light::LightState* light_state)
|
||||||
{
|
{
|
||||||
esphome::ratgdo::LightState state = this->parent_->getLightState();
|
esphome::ratgdo::LightState state = this->parent_->getLightState();
|
||||||
ESP_LOGD(TAG, "setup_state: getLightState: %d", state);
|
|
||||||
this->light_state_ = light_state;
|
this->light_state_ = light_state;
|
||||||
this->set_state(state);
|
this->set_state(state);
|
||||||
}
|
}
|
||||||
|
@ -50,10 +48,8 @@ namespace ratgdo {
|
||||||
bool binary;
|
bool binary;
|
||||||
state->current_values_as_binary(&binary);
|
state->current_values_as_binary(&binary);
|
||||||
if (binary) {
|
if (binary) {
|
||||||
ESP_LOGD(TAG, "output call lightOn");
|
|
||||||
this->parent_->lightOn();
|
this->parent_->lightOn();
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGD(TAG, "output call lightOff");
|
|
||||||
this->parent_->lightOff();
|
this->parent_->lightOff();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,6 @@ namespace ratgdo {
|
||||||
|
|
||||||
void RATGDOComponent::incrementRollingCodeCounter()
|
void RATGDOComponent::incrementRollingCodeCounter()
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "Incrementing rolling code counter");
|
|
||||||
this->rollingCodeCounter = (this->rollingCodeCounter + 1) & 0xfffffff;
|
this->rollingCodeCounter = (this->rollingCodeCounter + 1) & 0xfffffff;
|
||||||
sendRollingCodeChanged();
|
sendRollingCodeChanged();
|
||||||
}
|
}
|
||||||
|
@ -154,7 +153,6 @@ namespace ratgdo {
|
||||||
void RATGDOComponent::sendRollingCodeChanged()
|
void RATGDOComponent::sendRollingCodeChanged()
|
||||||
{
|
{
|
||||||
if (!this->rollingCodeUpdatesEnabled_) {
|
if (!this->rollingCodeUpdatesEnabled_) {
|
||||||
ESP_LOGD(TAG, "Rolling code updates disabled");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (auto* child : this->children_) {
|
for (auto* child : this->children_) {
|
||||||
|
|
|
@ -21,7 +21,6 @@ namespace ratgdo {
|
||||||
}
|
}
|
||||||
void RATGDOSwitch::write_state(bool state)
|
void RATGDOSwitch::write_state(bool state)
|
||||||
{
|
{
|
||||||
ESP_LOGD(TAG, "name: %s this->type_:%d state: %d", this->get_name(), this->switch_type_, state);
|
|
||||||
if (state) {
|
if (state) {
|
||||||
this->parent_->lock();
|
this->parent_->lock();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue