ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
whynter.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <cinttypes>
6
7namespace esphome::whynter {
8
9// Temperature
10const uint8_t TEMP_MIN_C = 16; // Celsius
11const uint8_t TEMP_MAX_C = 32; // Celsius
12const uint8_t TEMP_MIN_F = 61; // Fahrenheit
13const uint8_t TEMP_MAX_F = 89; // Fahrenheit
14
16 public:
20
23
24 // Set use of Fahrenheit units
25 void set_fahrenheit(bool value) {
26 this->fahrenheit_ = value;
27 this->temperature_step_ = 1.0f;
30 }
31
32 protected:
34 void transmit_state() override;
37
38 void transmit_(uint32_t value);
39
45
46 bool fahrenheit_{false};
47
49};
50
51} // namespace esphome::whynter
This class is used to encode all control actions on a climate device.
Definition climate.h:34
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
ClimateIR(float minimum_temperature, float maximum_temperature, float temperature_step=1.0f, bool supports_dry=false, bool supports_fan_only=false, climate::ClimateFanModeMask fan_modes=climate::ClimateFanModeMask(), climate::ClimateSwingModeMask swing_modes=climate::ClimateSwingModeMask(), climate::ClimatePresetMask presets=climate::ClimatePresetMask())
Definition climate_ir.h:25
void transmit_(uint32_t value)
Definition whynter.cpp:157
void set_fahrenheit(bool value)
Definition whynter.h:25
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
Definition whynter.h:22
bool on_receive(remote_base::RemoteReceiveData data) override
Handle received IR Buffer.
Definition whynter.cpp:101
climate::ClimateMode mode_before_
Definition whynter.h:48
void transmit_state() override
Transmit via IR the state of this climate controller.
Definition whynter.cpp:42
ClimateMode
Enum for all modes a climate device can be in.
@ CLIMATE_MODE_OFF
The climate device is off.
@ CLIMATE_FAN_MEDIUM
The fan mode is set to Medium.
@ CLIMATE_FAN_LOW
The fan mode is set to Low.
@ CLIMATE_FAN_HIGH
The fan mode is set to High.
const uint8_t TEMP_MAX_C
Definition whynter.h:11
const uint8_t TEMP_MAX_F
Definition whynter.h:13
const uint8_t TEMP_MIN_F
Definition whynter.h:12
const uint8_t TEMP_MIN_C
Definition whynter.h:10
constexpr float fahrenheit_to_celsius(float value)
Convert degrees Fahrenheit to degrees Celsius.
Definition helpers.h:1612
static void uint32_t