ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
bedjet_const.h
Go to the documentation of this file.
1#pragma once
2
3#include <set>
4
5namespace esphome::bedjet {
6
7static const char *const TAG = "bedjet";
8
10inline static uint8_t bedjet_fan_step_to_speed(const uint8_t fan) {
11 // 0 = 5%
12 // 19 = 100%
13 return 5 * fan + 5;
14}
15inline static uint8_t bedjet_fan_speed_to_index(const uint8_t speed) { return speed / 5 - 1; }
16
33
41
42// Which temperature to use as the climate entity's current temperature reading
44 // Use the temperature of the air the BedJet is putting out
46 // Use the ambient temperature of the room the BedJet is in
48};
49
50enum BedjetButton : uint8_t {
52 BTN_OFF = 0x1,
54 BTN_COOL = 0x2,
56 BTN_HEAT = 0x3,
58 BTN_TURBO = 0x4,
60 BTN_DRY = 0x5,
62 BTN_EXTHT = 0x6,
63
65 BTN_M1 = 0x20,
67 BTN_M2 = 0x21,
69 BTN_M3 = 0x22,
70
71 /* These are "MAGIC" buttons */
72
82};
83
84enum BedjetCommand : uint8_t {
91};
92
93#define BEDJET_FAN_STEP_NAMES_ \
94 { \
95 "5%", "10%", "15%", "20%", "25%", "30%", "35%", "40%", "45%", "50%", "55%", "60%", "65%", "70%", "75%", "80%", \
96 "85%", "90%", "95%", "100%" \
97 }
98
99static const uint8_t BEDJET_FAN_SPEED_COUNT = 20;
100
101static constexpr const char *const BEDJET_FAN_STEP_NAMES[BEDJET_FAN_SPEED_COUNT] = BEDJET_FAN_STEP_NAMES_;
102
103} // namespace esphome::bedjet
int speed
Definition fan.h:3
BedjetHeatMode
Optional heating strategies to use for climate::CLIMATE_MODE_HEAT.
@ HEAT_MODE_EXTENDED
HVACMode.HEAT is handled using BTN_EXTHT.
@ HEAT_MODE_HEAT
HVACMode.HEAT is handled using BTN_HEAT (default)
@ MODE_DRY
BedJet is in Dry mode (high speed, no heat)
@ MODE_EXTHT
BedJet is in Extended Heat mode (limited to 10 hours)
@ MODE_COOL
BedJet is in Cool mode (actually "Fan only" mode)
@ MODE_TURBO
BedJet is in Turbo mode (high heat, limited time)
@ MODE_HEAT
BedJet is in Heat mode (limited to 4 hours)
@ MODE_WAIT
BedJet is in "wait" mode, a step during a biorhythm program.
@ MODE_STANDBY
BedJet is Off.
@ BTN_TURBO
Enter Turbo mode (high heat, limited to 10 minutes)
@ MAGIC_CONNTEST
Perform a connection test.
@ BTN_M1
Start the M1 biorhythm/preset program.
@ BTN_DRY
Enter Dry mode (high speed, no heat)
@ BTN_EXTHT
Enter Extended Heat mode (limited to 10 hours)
@ BTN_HEAT
Enter Heat mode (limited to 4 hours)
@ MAGIC_NOTIFY_ACK
Acknowledge notification handled. See BedjetNotify.
@ BTN_COOL
Enter Cool mode (fan only)
@ BTN_OFF
Turn BedJet off.
@ BTN_M2
Start the M2 biorhythm/preset program.
@ BTN_M3
Start the M3 biorhythm/preset program.
@ MAGIC_UPDATE
Request a firmware update. This will also restart the Bedjet.
@ MAGIC_DEBUG_ON
Turn debug mode on/off.