ESPHome 2025.5.0
Loading...
Searching...
No Matches
bedjet_const.h
Go to the documentation of this file.
1#pragma once
2
3#include <set>
4
5namespace esphome {
6namespace bedjet {
7
8static const char *const TAG = "bedjet";
9
11inline static uint8_t bedjet_fan_step_to_speed(const uint8_t fan) {
12 // 0 = 5%
13 // 19 = 100%
14 return 5 * fan + 5;
15}
16inline static uint8_t bedjet_fan_speed_to_index(const uint8_t speed) { return speed / 5 - 1; }
17
34
42
43// Which temperature to use as the climate entity's current temperature reading
45 // Use the temperature of the air the BedJet is putting out
47 // Use the ambient temperature of the room the BedJet is in
49};
50
51enum BedjetButton : uint8_t {
53 BTN_OFF = 0x1,
55 BTN_COOL = 0x2,
57 BTN_HEAT = 0x3,
59 BTN_TURBO = 0x4,
61 BTN_DRY = 0x5,
63 BTN_EXTHT = 0x6,
64
66 BTN_M1 = 0x20,
68 BTN_M2 = 0x21,
70 BTN_M3 = 0x22,
71
72 /* These are "MAGIC" buttons */
73
83};
84
85enum BedjetCommand : uint8_t {
92};
93
94#define BEDJET_FAN_STEP_NAMES_ \
95 { \
96 "5%", "10%", "15%", "20%", "25%", "30%", "35%", "40%", "45%", "50%", "55%", "60%", "65%", "70%", "75%", "80%", \
97 "85%", "90%", "95%", "100%" \
98 }
99
100static const uint8_t BEDJET_FAN_SPEED_COUNT = 20;
101
102static const char *const BEDJET_FAN_STEP_NAMES[BEDJET_FAN_SPEED_COUNT] = BEDJET_FAN_STEP_NAMES_;
103static const std::string BEDJET_FAN_STEP_NAME_STRINGS[BEDJET_FAN_SPEED_COUNT] = BEDJET_FAN_STEP_NAMES_;
104static const std::set<std::string> BEDJET_FAN_STEP_NAMES_SET BEDJET_FAN_STEP_NAMES_;
105
106} // namespace bedjet
107} // namespace esphome
int speed
Definition fan.h:1
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.
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7