This commit is contained in:
J. Nick Koston 2023-06-07 14:08:35 -05:00
parent ad987adb3c
commit 4238b28761
No known key found for this signature in database
1 changed files with 7 additions and 7 deletions

View File

@ -12,19 +12,19 @@ namespace ratgdo {
LOG_BINARY_SENSOR("", "RATGDO BinarySensor", this);
ESP_LOGCONFIG(TAG, " Type: %s", this->type_ == SensorType::RATGDO_SENSOR_MOTION ? "Motion" : "Obstruction");
}
void RATGDOBinarySensor::on_motion_state(esphome::ratgdo::MotionState state)
void RATGDOBinarySensor::on_motion_state(MotionState state)
{
if (this->type_ == SensorType::RATGDO_SENSOR_MOTION)
this->publish_state(state == esphome::ratgdo::MotionState::MOTION_STATE_DETECTED);
this->publish_state(state == MotionState::MOTION_STATE_DETECTED);
}
void RATGDOBinarySensor::on_obstruction_state(esphome::ratgdo::ObstructionState state)
void RATGDOBinarySensor::on_obstruction_state(ObstructionState state)
{
if (this->type_ == SensorType::RATGDO_SENSOR_OBSTRUCTION)
this->publish_state(state == esphome::ratgdo::ObstructionState::OBSTRUCTION_STATE_OBSTRUCTED);
this->publish_state(state == ObstructionState::OBSTRUCTION_STATE_OBSTRUCTED);
}
void RATGDOBinarySensor::on_door_state(esphome::ratgdo::DoorState state) { }
void RATGDOBinarySensor::on_light_state(esphome::ratgdo::LightState state) { }
void RATGDOBinarySensor::on_lock_state(esphome::ratgdo::LockState state) { }
void RATGDOBinarySensor::on_door_state(DoorState state) { }
void RATGDOBinarySensor::on_light_state(LightState state) { }
void RATGDOBinarySensor::on_lock_state(:LockState state) { }
} // namespace ratgdo
} // namespace esphome