ESPHome  2021.9.3
Public Member Functions | Data Fields
esphome::climate::ClimateDeviceRestoreState Struct Reference

Struct used to save the state of the climate device in restore memory. More...

#include <climate.h>

Public Member Functions

ClimateCall to_call (Climate *climate)
 Convert this struct to a climate call that can be performed. More...
 
void apply (Climate *climate)
 Apply these settings to the climate device. More...
 

Data Fields

ClimateMode mode
 
bool uses_custom_fan_mode {false}
 
union {
   ClimateFanMode   fan_mode
 
   uint8_t   custom_fan_mode
 
}; 
 
bool uses_custom_preset {false}
 
union {
   ClimatePreset   preset
 
   uint8_t   custom_preset
 
}; 
 
ClimateSwingMode swing_mode
 
union {
   float   target_temperature
 
   struct {
      float   target_temperature_low
 
      float   target_temperature_high
 
   } 
 
}; 
 

Detailed Description

Struct used to save the state of the climate device in restore memory.

Make sure to update RESTORE_STATE_VERSION when changing the struct entries.

Definition at line 124 of file climate.h.

Member Function Documentation

◆ apply()

void esphome::climate::ClimateDeviceRestoreState::apply ( Climate climate)

Apply these settings to the climate device.

Definition at line 460 of file climate.cpp.

◆ to_call()

ClimateCall esphome::climate::ClimateDeviceRestoreState::to_call ( Climate climate)

Convert this struct to a climate call that can be performed.

Definition at line 439 of file climate.cpp.

Field Documentation

◆ @5

union { ... }

◆ @7

union { ... }

◆ @9

union { ... }

◆ custom_fan_mode

uint8_t esphome::climate::ClimateDeviceRestoreState::custom_fan_mode

Definition at line 129 of file climate.h.

◆ custom_preset

uint8_t esphome::climate::ClimateDeviceRestoreState::custom_preset

Definition at line 134 of file climate.h.

◆ fan_mode

ClimateFanMode esphome::climate::ClimateDeviceRestoreState::fan_mode

Definition at line 128 of file climate.h.

◆ mode

ClimateMode esphome::climate::ClimateDeviceRestoreState::mode

Definition at line 125 of file climate.h.

◆ preset

ClimatePreset esphome::climate::ClimateDeviceRestoreState::preset

Definition at line 133 of file climate.h.

◆ swing_mode

ClimateSwingMode esphome::climate::ClimateDeviceRestoreState::swing_mode

Definition at line 136 of file climate.h.

◆ target_temperature

float esphome::climate::ClimateDeviceRestoreState::target_temperature

Definition at line 138 of file climate.h.

◆ target_temperature_high

float esphome::climate::ClimateDeviceRestoreState::target_temperature_high

Definition at line 141 of file climate.h.

◆ target_temperature_low

float esphome::climate::ClimateDeviceRestoreState::target_temperature_low

Definition at line 140 of file climate.h.

◆ uses_custom_fan_mode

bool esphome::climate::ClimateDeviceRestoreState::uses_custom_fan_mode {false}

Definition at line 126 of file climate.h.

◆ uses_custom_preset

bool esphome::climate::ClimateDeviceRestoreState::uses_custom_preset {false}

Definition at line 131 of file climate.h.


The documentation for this struct was generated from the following files: