ESPHome 2026.3.0
Loading...
Searching...
No Matches
noblex.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace esphome {
6namespace noblex {
7
8// Temperature
9const uint8_t NOBLEX_TEMP_MIN = 16; // Celsius
10const uint8_t NOBLEX_TEMP_MAX = 30; // Celsius
11
13 public:
19
20 void setup() override {
23 }
24
25 // Override control to change settings of the climate device.
26 void control(const climate::ClimateCall &call) override {
27 send_swing_cmd_ = call.get_swing_mode().has_value();
28 // swing resets after unit powered off
29 auto mode = call.get_mode();
30 if (mode.has_value() && *mode == climate::CLIMATE_MODE_OFF)
33 }
34
35 // used to track when to send the power toggle command.
37
38 protected:
40 void transmit_state() override;
43 bool send_swing_cmd_{false};
44 bool receiving_{false};
45 uint8_t remote_state_[8]{};
46};
47
48} // namespace noblex
49} // namespace esphome
This class is used to encode all control actions on a climate device.
Definition climate.h:33
ClimateMode mode
The active mode of the climate device.
Definition climate.h:266
ClimateSwingMode swing_mode
The active swing mode of the climate device.
Definition climate.h:272
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:26
void transmit_state() override
Transmit via IR the state of this climate controller.
Definition noblex.cpp:34
void control(const climate::ClimateCall &call) override
Definition noblex.h:26
bool on_receive(remote_base::RemoteReceiveData data) override
Handle received IR Buffer.
Definition noblex.cpp:147
void setup() override
Definition noblex.h:20
@ CLIMATE_SWING_OFF
The swing mode is set to Off.
@ CLIMATE_SWING_VERTICAL
The fan mode is set to Vertical.
@ CLIMATE_MODE_OFF
The climate device is off.
@ CLIMATE_FAN_MEDIUM
The fan mode is set to Medium.
@ CLIMATE_FAN_AUTO
The fan mode is set to Auto.
@ CLIMATE_FAN_LOW
The fan mode is set to Low.
@ CLIMATE_FAN_HIGH
The fan mode is set to High.
const uint8_t NOBLEX_TEMP_MIN
Definition noblex.h:9
const uint8_t NOBLEX_TEMP_MAX
Definition noblex.h:10
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7