esphome-ratgdo/components/ratgdo/ratgdo_child.h

33 lines
837 B
C
Raw Normal View History

2023-06-07 14:49:24 +00:00
#pragma once
#include "esphome/core/helpers.h"
2023-06-07 14:59:09 +00:00
#include "ratgdo.h"
2023-06-07 14:49:24 +00:00
namespace esphome {
namespace ratgdo {
2023-06-07 14:51:22 +00:00
// Forward declare RATGDOComponent
class RATGDOComponent;
2023-06-07 15:02:01 +00:00
// Forward declare enums
enum DoorState;
enum LightState;
enum LockState;
enum MotionState;
enum ObstructionState;
2023-06-07 14:49:24 +00:00
2023-06-07 14:51:22 +00:00
class RATGDOClient : public Parented<RATGDOComponent> {
public:
2023-06-07 14:59:09 +00:00
virtual void on_door_state(DoorState state) = 0;
virtual void on_light_state(LightState state) = 0;
virtual void on_lock_state(LockState state) = 0;
virtual void on_motion_state(MotionState state) = 0;
virtual void on_obstruction_state(ObstructionState state) = 0;
2023-06-07 14:49:24 +00:00
2023-06-07 14:51:22 +00:00
protected:
friend RATGDOComponent;
virtual std::string describe() = 0;
};
2023-06-07 14:49:24 +00:00
2023-06-07 14:51:22 +00:00
} // namespace ratgdo
} // namespace esphome