binary sensor

This commit is contained in:
J. Nick Koston 2023-06-07 11:40:49 -05:00
parent fbcd2617b2
commit 205bbc2066
No known key found for this signature in database
2 changed files with 11 additions and 5 deletions

View File

@ -19,6 +19,12 @@ void RATGDOBinarySensor::on_obstruction_state(esphome::ratgdo::ObstructionState
if (this->type_ == SensorType::RATGDO_SENSOR_OBSTRUCTION)
this->publish_state(state == esphome::ratgdo::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) {}
} // namespace ratgdo
} // namespace esphome

View File

@ -13,11 +13,11 @@ namespace ratgdo {
class RATGDOClient : public Parented<RATGDOComponent> {
public:
void on_door_state(esphome::ratgdo::DoorState state) = 0;
void on_light_state(esphome::ratgdo::LightState state) = 0;
void on_lock_state(esphome::ratgdo::LockState state) = 0;
void on_motion_state(esphome::ratgdo::MotionState state) = 0;
void on_obstruction_state(esphome::ratgdo::ObstructionState state) = 0;
virtual void on_door_state(esphome::ratgdo::DoorState state) = 0;
virtual void on_light_state(esphome::ratgdo::LightState state) = 0;
virtual void on_lock_state(esphome::ratgdo::LockState state) = 0;
virtual void on_motion_state(esphome::ratgdo::MotionState state) = 0;
virtual void on_obstruction_state(esphome::ratgdo::ObstructionState state) = 0;
protected:
friend RATGDOComponent;