mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Swap fan and swing fields for Fujitu ACs (#1635)
This commit is contained in:
parent
4ae4a4ee88
commit
07db9319ad
2 changed files with 46 additions and 10 deletions
|
@ -41,33 +41,33 @@ const uint8_t FUJITSU_GENERAL_TEMPERATURE_NIBBLE = 16;
|
||||||
|
|
||||||
// Power on
|
// Power on
|
||||||
const uint8_t FUJITSU_GENERAL_POWER_ON_NIBBLE = 17;
|
const uint8_t FUJITSU_GENERAL_POWER_ON_NIBBLE = 17;
|
||||||
const uint8_t FUJITSU_GENERAL_POWER_ON = 0x01;
|
|
||||||
const uint8_t FUJITSU_GENERAL_POWER_OFF = 0x00;
|
const uint8_t FUJITSU_GENERAL_POWER_OFF = 0x00;
|
||||||
|
const uint8_t FUJITSU_GENERAL_POWER_ON = 0x01;
|
||||||
|
|
||||||
// Mode
|
// Mode
|
||||||
const uint8_t FUJITSU_GENERAL_MODE_NIBBLE = 19;
|
const uint8_t FUJITSU_GENERAL_MODE_NIBBLE = 19;
|
||||||
const uint8_t FUJITSU_GENERAL_MODE_AUTO = 0x00;
|
const uint8_t FUJITSU_GENERAL_MODE_AUTO = 0x00;
|
||||||
const uint8_t FUJITSU_GENERAL_MODE_HEAT = 0x04;
|
|
||||||
const uint8_t FUJITSU_GENERAL_MODE_COOL = 0x01;
|
const uint8_t FUJITSU_GENERAL_MODE_COOL = 0x01;
|
||||||
const uint8_t FUJITSU_GENERAL_MODE_DRY = 0x02;
|
const uint8_t FUJITSU_GENERAL_MODE_DRY = 0x02;
|
||||||
const uint8_t FUJITSU_GENERAL_MODE_FAN = 0x03;
|
const uint8_t FUJITSU_GENERAL_MODE_FAN = 0x03;
|
||||||
|
const uint8_t FUJITSU_GENERAL_MODE_HEAT = 0x04;
|
||||||
// const uint8_t FUJITSU_GENERAL_MODE_10C = 0x0B;
|
// const uint8_t FUJITSU_GENERAL_MODE_10C = 0x0B;
|
||||||
|
|
||||||
// Swing
|
// Swing
|
||||||
const uint8_t FUJITSU_GENERAL_FAN_NIBBLE = 20;
|
const uint8_t FUJITSU_GENERAL_SWING_NIBBLE = 20;
|
||||||
|
const uint8_t FUJITSU_GENERAL_SWING_NONE = 0x00;
|
||||||
|
const uint8_t FUJITSU_GENERAL_SWING_VERTICAL = 0x01;
|
||||||
|
const uint8_t FUJITSU_GENERAL_SWING_HORIZONTAL = 0x02;
|
||||||
|
const uint8_t FUJITSU_GENERAL_SWING_BOTH = 0x03;
|
||||||
|
|
||||||
|
// Fan
|
||||||
|
const uint8_t FUJITSU_GENERAL_FAN_NIBBLE = 21;
|
||||||
const uint8_t FUJITSU_GENERAL_FAN_AUTO = 0x00;
|
const uint8_t FUJITSU_GENERAL_FAN_AUTO = 0x00;
|
||||||
const uint8_t FUJITSU_GENERAL_FAN_HIGH = 0x01;
|
const uint8_t FUJITSU_GENERAL_FAN_HIGH = 0x01;
|
||||||
const uint8_t FUJITSU_GENERAL_FAN_MEDIUM = 0x02;
|
const uint8_t FUJITSU_GENERAL_FAN_MEDIUM = 0x02;
|
||||||
const uint8_t FUJITSU_GENERAL_FAN_LOW = 0x03;
|
const uint8_t FUJITSU_GENERAL_FAN_LOW = 0x03;
|
||||||
const uint8_t FUJITSU_GENERAL_FAN_SILENT = 0x04;
|
const uint8_t FUJITSU_GENERAL_FAN_SILENT = 0x04;
|
||||||
|
|
||||||
// Fan speed
|
|
||||||
const uint8_t FUJITSU_GENERAL_SWING_NIBBLE = 21;
|
|
||||||
const uint8_t FUJITSU_GENERAL_SWING_NONE = 0x00;
|
|
||||||
const uint8_t FUJITSU_GENERAL_SWING_VERTICAL = 0x01;
|
|
||||||
const uint8_t FUJITSU_GENERAL_SWING_HORIZONTAL = 0x02;
|
|
||||||
const uint8_t FUJITSU_GENERAL_SWING_BOTH = 0x03;
|
|
||||||
|
|
||||||
// TODO Outdoor Unit Low Noise
|
// TODO Outdoor Unit Low Noise
|
||||||
// const uint8_t FUJITSU_GENERAL_OUTDOOR_UNIT_LOW_NOISE_BYTE14 = 0xA0;
|
// const uint8_t FUJITSU_GENERAL_OUTDOOR_UNIT_LOW_NOISE_BYTE14 = 0xA0;
|
||||||
// const uint8_t FUJITSU_GENERAL_STATE_BYTE14 = 0x20;
|
// const uint8_t FUJITSU_GENERAL_STATE_BYTE14 = 0x20;
|
||||||
|
|
|
@ -11,6 +11,42 @@ namespace fujitsu_general {
|
||||||
const uint8_t FUJITSU_GENERAL_TEMP_MIN = 16; // Celsius // TODO 16 for heating, 18 for cooling, unsupported in ESPH
|
const uint8_t FUJITSU_GENERAL_TEMP_MIN = 16; // Celsius // TODO 16 for heating, 18 for cooling, unsupported in ESPH
|
||||||
const uint8_t FUJITSU_GENERAL_TEMP_MAX = 30; // Celsius
|
const uint8_t FUJITSU_GENERAL_TEMP_MAX = 30; // Celsius
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
/**
|
||||||
|
* ```
|
||||||
|
* turn
|
||||||
|
* on temp mode fan swing
|
||||||
|
* * | | | | | | *
|
||||||
|
*
|
||||||
|
* temperatures 1 1248 124 124 1
|
||||||
|
* auto auto 18 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000100 00000000 00000000 00000000 00000000 00000000 00000100 11110001
|
||||||
|
* auto auto 19 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10001100 00000000 00000000 00000000 00000000 00000000 00000100 11111110
|
||||||
|
* auto auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 00000000 00000000 00000000 00000000 00000000 00000100 11110011
|
||||||
|
*
|
||||||
|
* on flag:
|
||||||
|
* on at 16 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000000 00100000 00000000 00000000 00000000 00000000 00000100 11010101
|
||||||
|
* down to 16 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000000 00100000 00000000 00000000 00000000 00000000 00000100 00110101
|
||||||
|
*
|
||||||
|
* mode options:
|
||||||
|
* auto auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 00000000 00000000 00000000 00000000 00000000 00000100 11110011
|
||||||
|
* cool auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 10000000 00000000 00000000 00000000 00000000 00000100 01110011
|
||||||
|
* dry auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 01000000 00000000 00000000 00000000 00000000 00000100 10110011
|
||||||
|
* fan (auto) (30) 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 11000000 00000000 00000000 00000000 00000000 00000100 00110011
|
||||||
|
* heat auto 30 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 00100000 00000000 00000000 00000000 00000000 00000100 11010011
|
||||||
|
*
|
||||||
|
* fan options:
|
||||||
|
* heat 30 high 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 10000111 00100000 10000000 00000000 00000000 00000000 00000100 01010011
|
||||||
|
* heat 30 med 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 01000000 00000000 00000000 00000000 00000100 01010011
|
||||||
|
* heat 30 low 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 11000000 00000000 00000000 00000000 00000100 10010011
|
||||||
|
* heat 30 quiet 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 00100000 00000000 00000000 00000000 00000100 00010011
|
||||||
|
*
|
||||||
|
* swing options:
|
||||||
|
* heat 30 swing vert 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 00101000 00000000 00000000 00000000 00000100 00011101
|
||||||
|
* heat 30 noswing 00101000 11000110 00000000 00001000 00001000 01111111 10010000 00001100 00000111 00100000 00100000 00000000 00000000 00000000 00000100 00010011
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
class FujitsuGeneralClimate : public climate_ir::ClimateIR {
|
class FujitsuGeneralClimate : public climate_ir::ClimateIR {
|
||||||
public:
|
public:
|
||||||
FujitsuGeneralClimate()
|
FujitsuGeneralClimate()
|
||||||
|
|
Loading…
Reference in a new issue