ESPHome  2024.11.2
smartair2_climate.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <chrono>
4 #include "haier_base.h"
5 
6 namespace esphome {
7 namespace haier {
8 
10  public:
12  Smartair2Climate(const Smartair2Climate &) = delete;
13  Smartair2Climate &operator=(const Smartair2Climate &) = delete;
15  void dump_config() override;
16  void set_alternative_swing_control(bool swing_control);
17 
18  protected:
19  void set_handlers() override;
20  void process_phase(std::chrono::steady_clock::time_point now) override;
21  haier_protocol::HaierMessage get_power_message(bool state) override;
22  haier_protocol::HaierMessage get_control_message() override;
23  // Answer handlers
24  haier_protocol::HandlerError status_handler_(haier_protocol::FrameType request_type,
25  haier_protocol::FrameType message_type, const uint8_t *data,
26  size_t data_size);
27  haier_protocol::HandlerError get_device_version_answer_handler_(haier_protocol::FrameType request_type,
28  haier_protocol::FrameType message_type,
29  const uint8_t *data, size_t data_size);
30  haier_protocol::HandlerError get_device_id_answer_handler_(haier_protocol::FrameType request_type,
31  haier_protocol::FrameType message_type,
32  const uint8_t *data, size_t data_size);
33  haier_protocol::HandlerError messages_timeout_handler_with_cycle_for_init_(haier_protocol::FrameType message_type);
34  // Helper functions
35  haier_protocol::HandlerError process_status_message_(const uint8_t *packet, uint8_t size);
37 };
38 
39 } // namespace haier
40 } // namespace esphome
haier_protocol::HandlerError status_handler_(haier_protocol::FrameType request_type, haier_protocol::FrameType message_type, const uint8_t *data, size_t data_size)
Smartair2Climate & operator=(const Smartair2Climate &)=delete
void process_phase(std::chrono::steady_clock::time_point now) override
void set_alternative_swing_control(bool swing_control)
haier_protocol::HaierMessage get_power_message(bool state) 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::HaierMessage get_control_message() override
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::HandlerError process_status_message_(const uint8_t *packet, uint8_t size)
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
haier_protocol::HandlerError messages_timeout_handler_with_cycle_for_init_(haier_protocol::FrameType message_type)
bool state
Definition: fan.h:34