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