ESPHome  2024.11.0
fujitsu_general.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "esphome/core/log.h"
7 
8 namespace esphome {
9 namespace fujitsu_general {
10 
11 const uint8_t FUJITSU_GENERAL_TEMP_MIN = 16; // Celsius // TODO 16 for heating, 18 for cooling, unsupported in ESPH
12 const uint8_t FUJITSU_GENERAL_TEMP_MAX = 30; // Celsius
13 
14 // clang-format off
48 // clang-format on
49 
51  public:
53  : ClimateIR(FUJITSU_GENERAL_TEMP_MIN, FUJITSU_GENERAL_TEMP_MAX, 1.0f, true, true,
58 
59  protected:
61  void transmit_state() override;
63  void transmit_off_();
64 
66  bool on_receive(remote_base::RemoteReceiveData data) override;
67 
69  void transmit_(uint8_t const *message, uint8_t length);
70 
72  uint8_t checksum_state_(uint8_t const *message);
73 
75  uint8_t checksum_util_(uint8_t const *message);
76 
77  // true if currently on - fujitsus transmit an on flag on when the remote moves from off to on
78  bool power_{false};
79 };
80 
81 } // namespace fujitsu_general
82 } // namespace esphome
The fan mode is set to Low.
Definition: climate_mode.h:54
The fan mode is set to Quiet.
Definition: climate_mode.h:66
bool on_receive(remote_base::RemoteReceiveData data) override
Parse incoming message.
The fan mode is set to Both.
Definition: climate_mode.h:74
void transmit_(uint8_t const *message, uint8_t length)
Transmit message as IR pulses.
uint8_t checksum_util_(uint8_t const *message)
Calculate cecksum for a util message.
void transmit_state() override
Transmit via IR the state of this climate controller.
const uint8_t FUJITSU_GENERAL_TEMP_MAX
void transmit_off_()
Transmit via IR power off command.
The fan mode is set to Horizontal.
Definition: climate_mode.h:78
The fan mode is set to Auto.
Definition: climate_mode.h:52
uint8_t checksum_state_(uint8_t const *message)
Calculate checksum for a state message.
ClimateIR(float minimum_temperature, float maximum_temperature, float temperature_step=1.0f, bool supports_dry=false, bool supports_fan_only=false, std::set< climate::ClimateFanMode > fan_modes={}, std::set< climate::ClimateSwingMode > swing_modes={}, std::set< climate::ClimatePreset > presets={})
Definition: climate_ir.h:26
The fan mode is set to Vertical.
Definition: climate_mode.h:76
const uint8_t FUJITSU_GENERAL_TEMP_MIN
The fan mode is set to High.
Definition: climate_mode.h:58
The swing mode is set to Off.
Definition: climate_mode.h:72
uint16_t length
Definition: tt21100.cpp:12
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
The fan mode is set to Medium.
Definition: climate_mode.h:56