ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
gree_switch.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace gree {
9
10class GreeModeBitSwitch : public switch_::Switch, public Component, public Parented<GreeClimate> {
11 public:
12 GreeModeBitSwitch(const char *name, uint8_t bit_mask) : name_(name), bit_mask_(bit_mask) {}
13
14 void setup() override;
15 void dump_config() override;
16 void write_state(bool state) override;
17
18 protected:
19 const char *name_;
20 uint8_t bit_mask_;
21};
22
23} // namespace gree
24} // namespace esphome
Helper class to easily give an object a parent of type T.
Definition helpers.h:1037
GreeModeBitSwitch(const char *name, uint8_t bit_mask)
Definition gree_switch.h:12
void write_state(bool state) override
Base class for all switches.
Definition switch.h:39
bool state
The current reported state of the binary sensor.
Definition switch.h:56
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7