binary sensor
This commit is contained in:
parent
fbcd2617b2
commit
205bbc2066
|
@ -19,6 +19,12 @@ void RATGDOBinarySensor::on_obstruction_state(esphome::ratgdo::ObstructionState
|
||||||
if (this->type_ == SensorType::RATGDO_SENSOR_OBSTRUCTION)
|
if (this->type_ == SensorType::RATGDO_SENSOR_OBSTRUCTION)
|
||||||
this->publish_state(state == esphome::ratgdo::ObstructionState::OBSTRUCTION_STATE_OBSTRUCTED);
|
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 ratgdo
|
||||||
} // namespace esphome
|
} // namespace esphome
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,11 @@ namespace ratgdo {
|
||||||
|
|
||||||
class RATGDOClient : public Parented<RATGDOComponent> {
|
class RATGDOClient : public Parented<RATGDOComponent> {
|
||||||
public:
|
public:
|
||||||
void on_door_state(esphome::ratgdo::DoorState state) = 0;
|
virtual void on_door_state(esphome::ratgdo::DoorState state) = 0;
|
||||||
void on_light_state(esphome::ratgdo::LightState state) = 0;
|
virtual void on_light_state(esphome::ratgdo::LightState state) = 0;
|
||||||
void on_lock_state(esphome::ratgdo::LockState state) = 0;
|
virtual void on_lock_state(esphome::ratgdo::LockState state) = 0;
|
||||||
void on_motion_state(esphome::ratgdo::MotionState state) = 0;
|
virtual void on_motion_state(esphome::ratgdo::MotionState state) = 0;
|
||||||
void on_obstruction_state(esphome::ratgdo::ObstructionState state) = 0;
|
virtual void on_obstruction_state(esphome::ratgdo::ObstructionState state) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend RATGDOComponent;
|
friend RATGDOComponent;
|
||||||
|
|
Loading…
Reference in New Issue