Files
esphome-lsm6ds/esphome/components/micronova/switch/micronova_switch.h
T
236f6b1935 [micronova] Add command queue (#12268)
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>
2026-03-11 19:52:43 +13:00

28 lines
741 B
C++

#pragma once
#include "esphome/components/micronova/micronova.h"
#include "esphome/core/component.h"
#include "esphome/components/switch/switch.h"
namespace esphome::micronova {
class MicroNovaSwitch : public switch_::Switch, public MicroNovaListener {
public:
MicroNovaSwitch(MicroNova *m) : MicroNovaListener(m) {}
void dump_config() override;
void process_value_from_stove(int value_from_stove) override;
void set_memory_data_on(uint8_t f) { this->memory_data_on_ = f; }
void set_memory_data_off(uint8_t f) { this->memory_data_off_ = f; }
protected:
void write_state(bool state) override;
uint8_t memory_data_on_ = 0;
uint8_t memory_data_off_ = 0;
uint8_t raw_state_ = 0;
};
} // namespace esphome::micronova