14 namespace thermostat {
34 std::function<void()>
func;
47 float default_temperature{NAN};
48 float default_temperature_low{NAN};
49 float default_temperature_high{NAN};
50 float cool_deadband_{NAN};
51 float cool_overrun_{NAN};
52 float heat_deadband_{NAN};
53 float heat_overrun_{NAN};
62 void setup()
override;
63 void dump_config()
override;
69 void set_set_point_minimum_differential(
float differential);
70 void set_cool_deadband(
float deadband);
71 void set_cool_overrun(
float overrun);
72 void set_heat_deadband(
float deadband);
73 void set_heat_overrun(
float overrun);
74 void set_supplemental_cool_delta(
float delta);
75 void set_supplemental_heat_delta(
float delta);
76 void set_cooling_maximum_run_time_in_sec(uint32_t
time);
77 void set_heating_maximum_run_time_in_sec(uint32_t time);
78 void set_cooling_minimum_off_time_in_sec(uint32_t time);
79 void set_cooling_minimum_run_time_in_sec(uint32_t time);
80 void set_fan_mode_minimum_switching_time_in_sec(uint32_t time);
81 void set_fanning_minimum_off_time_in_sec(uint32_t time);
82 void set_fanning_minimum_run_time_in_sec(uint32_t time);
83 void set_heating_minimum_off_time_in_sec(uint32_t time);
84 void set_heating_minimum_run_time_in_sec(uint32_t time);
85 void set_idle_minimum_time_in_sec(uint32_t time);
88 void set_use_startup_delay(
bool use_startup_delay);
89 void set_supports_auto(
bool supports_auto);
90 void set_supports_heat_cool(
bool supports_heat_cool);
91 void set_supports_cool(
bool supports_cool);
92 void set_supports_dry(
bool supports_dry);
93 void set_supports_fan_only(
bool supports_fan_only);
94 void set_supports_fan_only_action_uses_fan_mode_timer(
bool fan_only_action_uses_fan_mode_timer);
95 void set_supports_fan_only_cooling(
bool supports_fan_only_cooling);
96 void set_supports_fan_with_cooling(
bool supports_fan_with_cooling);
97 void set_supports_fan_with_heating(
bool supports_fan_with_heating);
98 void set_supports_heat(
bool supports_heat);
99 void set_supports_fan_mode_on(
bool supports_fan_mode_on);
100 void set_supports_fan_mode_off(
bool supports_fan_mode_off);
101 void set_supports_fan_mode_auto(
bool supports_fan_mode_auto);
102 void set_supports_fan_mode_low(
bool supports_fan_mode_low);
103 void set_supports_fan_mode_medium(
bool supports_fan_mode_medium);
104 void set_supports_fan_mode_high(
bool supports_fan_mode_high);
105 void set_supports_fan_mode_middle(
bool supports_fan_mode_middle);
106 void set_supports_fan_mode_focus(
bool supports_fan_mode_focus);
107 void set_supports_fan_mode_diffuse(
bool supports_fan_mode_diffuse);
108 void set_supports_fan_mode_quiet(
bool supports_fan_mode_quiet);
109 void set_supports_swing_mode_both(
bool supports_swing_mode_both);
110 void set_supports_swing_mode_horizontal(
bool supports_swing_mode_horizontal);
111 void set_supports_swing_mode_off(
bool supports_swing_mode_off);
112 void set_supports_swing_mode_vertical(
bool supports_swing_mode_vertical);
113 void set_supports_two_points(
bool supports_two_points);
118 Trigger<> *get_cool_action_trigger()
const;
119 Trigger<> *get_supplemental_cool_action_trigger()
const;
120 Trigger<> *get_dry_action_trigger()
const;
121 Trigger<> *get_fan_only_action_trigger()
const;
122 Trigger<> *get_heat_action_trigger()
const;
123 Trigger<> *get_supplemental_heat_action_trigger()
const;
124 Trigger<> *get_idle_action_trigger()
const;
125 Trigger<> *get_auto_mode_trigger()
const;
126 Trigger<> *get_cool_mode_trigger()
const;
128 Trigger<> *get_fan_only_mode_trigger()
const;
129 Trigger<> *get_heat_mode_trigger()
const;
131 Trigger<> *get_fan_mode_on_trigger()
const;
132 Trigger<> *get_fan_mode_off_trigger()
const;
133 Trigger<> *get_fan_mode_auto_trigger()
const;
134 Trigger<> *get_fan_mode_low_trigger()
const;
135 Trigger<> *get_fan_mode_medium_trigger()
const;
136 Trigger<> *get_fan_mode_high_trigger()
const;
137 Trigger<> *get_fan_mode_middle_trigger()
const;
138 Trigger<> *get_fan_mode_focus_trigger()
const;
139 Trigger<> *get_fan_mode_diffuse_trigger()
const;
140 Trigger<> *get_fan_mode_quiet_trigger()
const;
141 Trigger<> *get_swing_mode_both_trigger()
const;
142 Trigger<> *get_swing_mode_horizontal_trigger()
const;
143 Trigger<> *get_swing_mode_off_trigger()
const;
144 Trigger<> *get_swing_mode_vertical_trigger()
const;
145 Trigger<> *get_temperature_change_trigger()
const;
146 Trigger<> *get_preset_change_trigger()
const;
148 float cool_deadband();
149 float cool_overrun();
150 float heat_deadband();
151 float heat_overrun();
155 bool climate_action_change_delayed();
156 bool fan_mode_change_delayed();
162 bool hysteresis_valid();
163 void validate_target_temperature();
164 void validate_target_temperatures();
165 void validate_target_temperature_low();
166 void validate_target_temperature_high();
175 void change_custom_preset_(
const std::string &custom_preset);
192 void trigger_supplemental_action_();
204 void check_temperature_change_trigger_();
207 bool idle_action_ready_();
208 bool cooling_action_ready_();
209 bool drying_action_ready_();
210 bool fan_mode_ready_();
211 bool fanning_action_ready_();
212 bool heating_action_ready_();
222 void cooling_max_run_time_timer_callback_();
223 void cooling_off_timer_callback_();
224 void cooling_on_timer_callback_();
225 void fan_mode_timer_callback_();
226 void fanning_off_timer_callback_();
227 void fanning_on_timer_callback_();
228 void heating_max_run_time_timer_callback_();
229 void heating_off_timer_callback_();
230 void heating_on_timer_callback_();
231 void idle_on_timer_callback_();
234 bool cooling_required_();
235 bool fanning_required_();
236 bool heating_required_();
237 bool supplemental_cooling_required_();
238 bool supplemental_heating_required_();
241 bool is_default_preset);
252 bool supports_auto_{
false};
253 bool supports_heat_cool_{
false};
254 bool supports_cool_{
false};
255 bool supports_dry_{
false};
256 bool supports_fan_only_{
false};
257 bool supports_heat_{
false};
259 bool supports_fan_only_action_uses_fan_mode_timer_{
false};
261 bool supports_fan_only_cooling_{
false};
263 bool supports_fan_with_cooling_{
false};
264 bool supports_fan_with_heating_{
false};
270 bool supports_fan_mode_on_{
false};
271 bool supports_fan_mode_off_{
false};
277 bool supports_fan_mode_auto_{
false};
282 bool supports_fan_mode_low_{
false};
283 bool supports_fan_mode_medium_{
false};
284 bool supports_fan_mode_high_{
false};
285 bool supports_fan_mode_middle_{
false};
286 bool supports_fan_mode_focus_{
false};
287 bool supports_fan_mode_diffuse_{
false};
288 bool supports_fan_mode_quiet_{
false};
293 bool supports_swing_mode_both_{
false};
294 bool supports_swing_mode_off_{
false};
295 bool supports_swing_mode_horizontal_{
false};
296 bool supports_swing_mode_vertical_{
false};
301 bool supports_two_points_{
false};
304 bool cooling_max_runtime_exceeded_{
false};
305 bool heating_max_runtime_exceeded_{
false};
308 bool use_startup_delay_{
false};
311 bool setup_complete_{
false};
425 float prev_target_temperature_{NAN};
426 float prev_target_temperature_low_{NAN};
427 float prev_target_temperature_high_{NAN};
430 float set_point_minimum_differential_{0};
433 float cooling_deadband_{0};
434 float cooling_overrun_{0};
435 float heating_deadband_{0};
436 float heating_overrun_{0};
439 float supplemental_cool_delta_{0};
440 float supplemental_heat_delta_{0};
443 const uint8_t min_timer_duration_{1};
446 std::vector<ThermostatClimateTimer> timer_{
460 std::map<climate::ClimatePreset, ThermostatClimateTargetTempConfig> preset_config_{};
462 std::map<std::string, ThermostatClimateTargetTempConfig> custom_preset_config_{};
467 std::string default_custom_preset_{};
This class is used to encode all control actions on a climate device.
The climate device is off (inactive or no power)
void idle_on_timer_callback_()
ClimatePreset
Enum for all preset modes.
void set_fan_mode(climate::ClimateFanMode fan_mode)
void heating_on_timer_callback_()
This class contains all static data for climate devices.
void set_swing_mode(climate::ClimateSwingMode swing_mode)
void fanning_on_timer_callback_()
void heating_off_timer_callback_()
ClimateSwingMode swing_mode
ClimateSwingMode
Enum for all modes a climate swing can be in.
void cooling_max_run_time_timer_callback_()
set_timeout() callbacks for various actions (see above)
BedjetMode mode
BedJet operating mode.
ClimateAction
Enum for the current action of the climate device. Values match those of ClimateMode.
void heating_max_run_time_timer_callback_()
ClimateMode
Enum for all modes a climate device can be in.
The swing mode is set to Off.
The climate device is off.
void fanning_off_timer_callback_()
void fan_mode_timer_callback_()
void cooling_off_timer_callback_()
The fan mode is set to On.
std::function< void()> func
Implementation of SPI Controller mode.
void set_mode(climate::ClimateMode mode)
Base-class for all sensors.
void cooling_on_timer_callback_()
ThermostatClimateTimerIndex
esphome::sensor::Sensor * sensor
ClimateDevice - This is the base class for all climate integrations.