2023-06-07 16:56:55 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../ratgdo.h"
|
|
|
|
#include "../ratgdo_state.h"
|
|
|
|
#include "esphome/components/cover/cover.h"
|
|
|
|
#include "esphome/core/component.h"
|
|
|
|
|
|
|
|
namespace esphome {
|
|
|
|
namespace ratgdo {
|
|
|
|
|
|
|
|
class RATGDOCover : public cover::Cover, public RATGDOClient, public Component {
|
|
|
|
public:
|
|
|
|
void dump_config() override;
|
2023-07-01 14:13:38 +00:00
|
|
|
void setup() override;
|
|
|
|
|
2023-06-07 16:56:55 +00:00
|
|
|
cover::CoverTraits get_traits() override;
|
2023-07-01 14:13:38 +00:00
|
|
|
void on_door_state(DoorState state, float position);
|
2023-06-07 22:49:37 +00:00
|
|
|
|
2023-06-07 17:04:22 +00:00
|
|
|
protected:
|
|
|
|
void control(const cover::CoverCall& call) override;
|
2023-06-07 16:56:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace ratgdo
|
|
|
|
} // namespace esphome
|