5#ifdef USE_TOSHIBA_RAS_25J2KVSG_ND
15static constexpr float TOSHIBA_RAS_25J2KVSG_ND_FROST_TEMP_C_MIN = 5.0f;
16static constexpr float TOSHIBA_RAS_25J2KVSG_ND_FROST_TEMP_C_MAX = 13.0f;
25 void setup()
override;
29 SUB_SELECT(power_selection)
33 enum class ToshibaPreset : uint8_t {
37 TOSHIBA_PRESET_FIREPLACE_1,
38 TOSHIBA_PRESET_FIREPLACE_2,
39 TOSHIBA_PRESET_FROST_PROTECTION,
40 TOSHIBA_PRESET_HADA_CARE,
41 TOSHIBA_PRESET_SLEEP_1H,
42 TOSHIBA_PRESET_SLEEP_3H,
43 TOSHIBA_PRESET_SLEEP_5H,
44 TOSHIBA_PRESET_SLEEP_9H,
57 return preset >= ToshibaPreset::TOSHIBA_PRESET_FIREPLACE_1 &&
58 preset <= ToshibaPreset::TOSHIBA_PRESET_FROST_PROTECTION;
65 return static_cast<ToshibaPreset
>(index +
static_cast<uint8_t
>(ToshibaPreset::TOSHIBA_PRESET_FIREPLACE_1));
68 return static_cast<uint8_t
>(
preset) -
static_cast<uint8_t
>(ToshibaPreset::TOSHIBA_PRESET_FIREPLACE_1);
80 float temperature_min()
override {
return TOSHIBA_RAS_25J2KVSG_ND_FROST_TEMP_C_MIN; }
This class is used to encode all control actions on a climate device.
optional< ClimatePreset > preset
The active preset of the climate device.
void set_model(Model model)
RAS-25J2KVSG-ND, driven like its WH-TA15PE remote.
bool receive_motion_(uint8_t command)
uint32_t swing_ignore_until_
void transmit_motion_(uint8_t command, uint8_t repeat)
void perform_(remote_base::RemoteTransmitterBase::TransmitCall &transmit, bool swing)
uint32_t last_frame_hash_
static ToshibaPreset custom_preset_at(size_t index)
bool on_receive(remote_base::RemoteReceiveData data) override
bool store_power_selection_(ToshibaPowerSelection power)
void publish_power_selection_()
static bool power_preset_supported(ToshibaPowerSelection power, ToshibaPreset preset)
static bool is_sleep_preset(ToshibaPreset preset)
void transmit_state() override
static bool parse_state(const uint8_t *message, uint8_t length, ToshibaPreset &preset, ToshibaPowerSelection &power)
ToshibaPowerSelection power_selection_
ESPPreferenceObject power_selection_pref_
void set_power_selection(size_t index)
void transmit_frame_(ToshibaPreset preset)
float temperature_min() override
void apply_toshiba_preset_(ToshibaPreset preset)
bool receive_frame_(const uint8_t *message, uint8_t length)
void sanitize_restore_state(climate::ClimateDeviceRestoreState &restore) override
void enter_preset_(ToshibaPreset previous, ToshibaPreset preset)
static ToshibaPreset preset_from_climate(climate::ClimatePreset preset)
static bool is_silent(ToshibaPowerSelection power)
void apply_fan_code_(uint8_t code)
static constexpr uint32_t POWER_SELECTION_RESTORE_VERSION
uint8_t normal_target_temperature_
ToshibaRas25j2kvsgNdClimate()
ToshibaPreset toshiba_preset_() const
uint8_t fan_code_() const
void transmit_current_temperature() override
static size_t custom_preset_index(ToshibaPreset preset)
void encode_motion_(remote_base::RemoteTransmitData *data, uint8_t command, uint8_t repeat)
void control(const climate::ClimateCall &call) override
static ToshibaPreset preset_from_custom(const char *custom_preset)
@ TOSHIBA_POWER_SELECTION_SILENT_1
@ TOSHIBA_POWER_SELECTION_100
@ TOSHIBA_POWER_SELECTION_50
@ TOSHIBA_POWER_SELECTION_COUNT
@ TOSHIBA_POWER_SELECTION_SILENT_2
@ TOSHIBA_POWER_SELECTION_75
static bool is_heating_preset(ToshibaPreset preset)
const LogString * message
ClimatePreset
Enum for all preset modes NOTE: If adding values, update ClimatePresetMask in climate_traits....
Struct used to save the state of the climate device in restore memory.