ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
whirlpool.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace esphome::whirlpool {
6
13
14// Temperature
19
21 public:
23
24 void setup() override {
26
28 }
29
31 void control(const climate::ClimateCall &call) override {
32 send_swing_cmd_ = call.get_swing_mode().has_value();
34 }
35
36 void set_model(Model model) {
37 this->model_ = model;
40 }
41
42 // used to track when to send the power toggle command
44
45 protected:
47 void transmit_state() override;
51 bool is_hisense_arg_() const {
52#ifdef USE_WHIRLPOOL_HISENSE_ARG
53 return this->model_ == MODEL_HISENSE_ARG;
54#else
55 return false;
56#endif
57 }
59 bool fixed_temp_mode_() const;
61 void encode_hisense_arg_(uint8_t *remote_state, bool power_toggle, uint8_t temp_step) const;
64
65 bool send_swing_cmd_{false}; // the DG11J1 remotes send swing as a toggle, only on the call that changed it
67
74};
75
76} // namespace esphome::whirlpool
This class is used to encode all control actions on a climate device.
Definition climate.h:31
ClimateMode mode
The active mode of the climate device.
Definition climate.h:317
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
bool is_hisense_arg_() const
False when the model is compiled out, so the compiler drops the Hisense ARG branches.
Definition whirlpool.h:51
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
Definition whirlpool.h:31
uint32_t last_transmit_time_
Set the time of the last transmission.
Definition whirlpool.h:63
bool fixed_temp_mode_() const
Modes in which the Hisense ARG model sends a fixed temperature.
void transmit_state() override
Transmit via IR the state of this climate controller.
Definition whirlpool.cpp:54
void encode_hisense_arg_(uint8_t *remote_state, bool power_toggle, uint8_t temp_step) const
Add the Hisense ARG bytes on top of the common whirlpool frame.
bool on_receive(remote_base::RemoteReceiveData data) override
Handle received IR Buffer.
@ CLIMATE_MODE_OFF
The climate device is off.
const float WHIRLPOOL_DG11J1_91_TEMP_MIN
Definition whirlpool.h:18
const float WHIRLPOOL_DG11J1_3A_TEMP_MAX
Definition whirlpool.h:15
const float WHIRLPOOL_DG11J1_91_TEMP_MAX
Definition whirlpool.h:17
Model
Simple enum to represent models.
Definition whirlpool.h:8
@ MODEL_DG11J1_91
Temperature range is from 18 to 32.
Definition whirlpool.h:10
@ MODEL_HISENSE_ARG
Temperature range is from 16 to 30.
Definition whirlpool.h:11
const float WHIRLPOOL_DG11J1_3A_TEMP_MIN
Definition whirlpool.h:16
static void uint32_t