esphome-ratgdo/components/ratgdo/light/ratgdo_light_output.h

32 lines
1.0 KiB
C
Raw Normal View History

2023-06-07 18:27:01 +00:00
#pragma once
#include "../ratgdo.h"
#include "../ratgdo_child.h"
#include "../ratgdo_state.h"
#include "esphome/components/light/light_output.h"
#include "esphome/core/component.h"
namespace esphome {
namespace ratgdo {
class RATGDOLightOutput : public light::LightOutput, public RATGDOClient, public Component {
public:
void dump_config() override;
light::LightTraits get_traits() override;
2023-06-07 18:28:37 +00:00
void setup_state(light::LightState* state) override { this->state_ = state; }
2023-06-07 18:31:25 +00:00
LightState* get_state() { return this->state_; }
2023-06-07 18:27:01 +00:00
void on_motion_state(esphome::ratgdo::MotionState state) override;
void on_obstruction_state(esphome::ratgdo::ObstructionState state) override;
void on_door_state(esphome::ratgdo::DoorState state) override;
void on_light_state(esphome::ratgdo::LightState state) override;
void on_lock_state(esphome::ratgdo::LockState state) override;
protected:
bool _is_on;
light::LightState* state_;
};
} // namespace ratgdo
} // namespace esphome