J. Nick Koston 58f0686c6d
tweak
2023-06-07 18:13:58 -05:00

30 lines
736 B
C++

#pragma once
#include "../ratgdo.h"
#include "../ratgdo_child.h"
#include "../ratgdo_state.h"
#include "esphome/components/number/number.h"
#include "esphome/core/component.h"
namespace esphome {
namespace ratgdo {
enum NumberType {
RATGDO_ROLLING_CODE_COUNTER
};
class RATGDONumber : public number::Number, public RATGDOClient, public Component {
public:
void dump_config() override;
void set_number_type(NumberType number_type_) { this->number_type_ = number_type_; }
void on_rolling_code_change(uint32_t rollingCodeCounter) override;
void control(float value) override;
protected:
NumberType number_type_;
};
} // namespace ratgdo
} // namespace esphome