ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
smartair2_climate.h
Go to the documentation of this file.
1#pragma once
2
3#include <chrono>
4#include "haier_base.h"
5
6namespace esphome::haier {
7
9 public:
14 void dump_config() override;
15 void set_alternative_swing_control(bool swing_control);
16
17 protected:
18 void set_handlers() override;
19 void process_phase(std::chrono::steady_clock::time_point now) override;
20 haier_protocol::HaierMessage get_power_message(bool state) override;
21 haier_protocol::HaierMessage get_control_message() override;
22 // Answer handlers
23 haier_protocol::HandlerError status_handler_(haier_protocol::FrameType request_type,
24 haier_protocol::FrameType message_type, const uint8_t *data,
25 size_t data_size);
26 haier_protocol::HandlerError get_device_version_answer_handler_(haier_protocol::FrameType request_type,
27 haier_protocol::FrameType message_type,
28 const uint8_t *data, size_t data_size);
29 haier_protocol::HandlerError get_device_id_answer_handler_(haier_protocol::FrameType request_type,
30 haier_protocol::FrameType message_type,
31 const uint8_t *data, size_t data_size);
32 haier_protocol::HandlerError messages_timeout_handler_with_cycle_for_init_(haier_protocol::FrameType message_type);
33 // Helper functions
34 haier_protocol::HandlerError process_status_message_(const uint8_t *packet, uint8_t size);
36};
37
38} // namespace esphome::haier
haier_protocol::HandlerError status_handler_(haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
haier_protocol::HaierMessage get_control_message() override
haier_protocol::HandlerError get_device_version_answer_handler_(haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
haier_protocol::HandlerError messages_timeout_handler_with_cycle_for_init_(haier_protocol::FrameType message_type)
haier_protocol::HandlerError process_status_message_(const uint8_t *packet, uint8_t size)
haier_protocol::HandlerError get_device_id_answer_handler_(haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
haier_protocol::HaierMessage get_power_message(bool state) override
void set_alternative_swing_control(bool swing_control)
Smartair2Climate(const Smartair2Climate &)=delete
Smartair2Climate & operator=(const Smartair2Climate &)=delete
void process_phase(std::chrono::steady_clock::time_point now) override
bool state
Definition fan.h:2
uint16_t size
Definition helpers.cpp:25