fix
This commit is contained in:
parent
0bfe3b0f1a
commit
28245dc131
|
@ -14,13 +14,13 @@ namespace ratgdo {
|
|||
}
|
||||
void RATGDOBinarySensor::on_motion_state(MotionState state)
|
||||
{
|
||||
ESP_LOGD(TAG, "this->type_:%d on_motion_state: %d", this->type_, state);
|
||||
ESP_LOGD(TAG, "name: %s this->type_:%d on_motion_state: %d", this->get_name(), this->type_, state);
|
||||
if (this->type_ == SensorType::RATGDO_SENSOR_MOTION)
|
||||
this->publish_state(state == MotionState::MOTION_STATE_DETECTED);
|
||||
}
|
||||
void RATGDOBinarySensor::on_obstruction_state(ObstructionState state)
|
||||
{
|
||||
ESP_LOGD(TAG, "this->type_:%d on_obstruction_state: %d", this->type_, state);
|
||||
ESP_LOGD(TAG, "name: %s this->type_:%d on_obstruction_state: %d", this->get_name(), this->type_, state);
|
||||
if (this->type_ == SensorType::RATGDO_SENSOR_OBSTRUCTION)
|
||||
this->publish_state(state == ObstructionState::OBSTRUCTION_STATE_OBSTRUCTED);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue