Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com> Co-authored-by: edenhaus <edenhaus@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@home-assistant.io> Co-authored-by: J. Nick Koston <nick+github@koston.org>
28 lines
696 B
C++
28 lines
696 B
C++
#pragma once
|
|
|
|
#include "esphome/components/micronova/micronova.h"
|
|
#include "esphome/components/sensor/sensor.h"
|
|
|
|
namespace esphome::micronova {
|
|
|
|
class MicroNovaSensor : public sensor::Sensor, public MicroNovaListener {
|
|
public:
|
|
MicroNovaSensor(MicroNova *m) : MicroNovaListener(m) {}
|
|
void dump_config() override;
|
|
|
|
void process_value_from_stove(int value_from_stove) override;
|
|
|
|
void set_divisor(uint8_t d) { this->divisor_ = d; }
|
|
void set_fan_speed_offset(uint8_t offset) {
|
|
this->is_fan_speed_ = true;
|
|
this->fan_speed_offset_ = offset;
|
|
}
|
|
|
|
protected:
|
|
uint8_t divisor_ = 1;
|
|
uint8_t fan_speed_offset_ = 0;
|
|
bool is_fan_speed_ = false;
|
|
};
|
|
|
|
} // namespace esphome::micronova
|