ESPHome 2025.5.0
Loading...
Searching...
No Matches
whynter.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <cinttypes>
6
7namespace esphome {
8namespace whynter {
9
10// Temperature
11const uint8_t TEMP_MIN_C = 16; // Celsius
12const uint8_t TEMP_MAX_C = 32; // Celsius
13const uint8_t TEMP_MIN_F = 61; // Fahrenheit
14const uint8_t TEMP_MAX_F = 89; // Fahrenheit
15
17 public:
21
24
25 // Set use of Fahrenheit units
26 void set_fahrenheit(bool value) {
27 this->fahrenheit_ = value;
28 this->temperature_step_ = 1.0f;
31 }
32
33 protected:
35 void transmit_state() override;
38
39 void transmit_(uint32_t value);
40
41 uint32_t header_high_ = 8000;
42 uint32_t header_low_ = 4000;
43 uint32_t bit_high_ = 600;
44 uint32_t bit_one_low_ = 1600;
45 uint32_t bit_zero_low_ = 550;
46
47 bool fahrenheit_{false};
48
50};
51
52} // namespace whynter
53} // namespace esphome
This class is used to encode all control actions on a climate device.
Definition climate.h:33
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, std::set< climate::ClimateFanMode > fan_modes={}, std::set< climate::ClimateSwingMode > swing_modes={}, std::set< climate::ClimatePreset > presets={})
Definition climate_ir.h:26
void transmit_(uint32_t value)
Definition whynter.cpp:158
void set_fahrenheit(bool value)
Definition whynter.h:26
void control(const climate::ClimateCall &call) override
Override control to change settings of the climate device.
Definition whynter.h:23
bool on_receive(remote_base::RemoteReceiveData data) override
Handle received IR Buffer.
Definition whynter.cpp:102
climate::ClimateMode mode_before_
Definition whynter.h:49
void transmit_state() override
Transmit via IR the state of this climate controller.
Definition whynter.cpp:43
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:12
const uint8_t TEMP_MAX_F
Definition whynter.h:14
const uint8_t TEMP_MIN_F
Definition whynter.h:13
const uint8_t TEMP_MIN_C
Definition whynter.h:11
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
constexpr float fahrenheit_to_celsius(float value)
Convert degrees Fahrenheit to degrees Celsius.
Definition helpers.h:484