17 #include <esp_gattc_api.h> 31 void setup()
override;
35 esp_ble_gattc_cb_param_t *param)
override;
43 void set_clock(uint8_t hour, uint8_t minute);
This class is used to encode all control actions on a climate device.
void set_supported_custom_presets(std::set< std::string > supported_custom_presets)
void set_time_id(time::RealTimeClock *time_id)
void set_visual_temperature_step(float temperature_step)
uint16_t config_descr_status_
BedjetHeatMode heating_mode_
float target_temperature
The target temperature of the climate device.
const float AFTER_WIFI
For components that should be initialized after WiFi is connected.
float get_setup_priority() const override
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock...
This class contains all static data for climate devices.
void upgrade_firmware()
Attempts to check for and apply firmware updates.
void add_supported_custom_preset(const std::string &preset)
void set_visual_min_temperature(float visual_min_temperature)
The climate device is set to heat to reach the target temperature.
climate::ClimateTraits traits() override
ClimateMode mode
The active mode of the climate device.
uint16_t char_handle_status_
void send_local_time()
Attempts to sync the local time (via time_id) to the BedJet device.
float current_temperature
The current temperature of the climate device, as reported from the integration.
This class simplifies creating components that periodically check a state.
The climate device is set to dry/humidity mode.
void set_supported_presets(std::set< ClimatePreset > presets)
uint8_t set_notify_(bool enable)
Configures the local ESP BLE client to register (true) or unregister (false) for status notifications...
static const uint32_t NOTIFY_WARN_THRESHOLD
static ESPBTUUID from_raw(const uint8_t *data)
HVACMode.HEAT is handled using BTN_EXTHT.
void setup_time_()
Initializes time sync callbacks to support syncing current time to the BedJet.
void set_status_timeout(uint32_t timeout)
bool update_status_()
Attempts to update the climate device from the last received BedjetStatusPacket.
void dump_config() override
void set_supported_modes(std::set< ClimateMode > modes)
static const uint32_t DEFAULT_STATUS_TIMEOUT
void set_visual_max_temperature(float visual_max_temperature)
uint8_t write_notify_config_descriptor_(bool enable)
Reimplementation of BLEClient.gattc_event_handler() for ESP_GATTC_REG_FOR_NOTIFY_EVT.
The climate device is off.
void set_supports_action(bool supports_action)
void reset_state_()
Resets states to defaults.
void set_heating_mode(BedjetHeatMode mode)
Sets the default strategy to use for climate::CLIMATE_MODE_HEAT.
uint8_t write_bedjet_packet_(BedjetPacket *pkt)
Writes one BedjetPacket to the BLE client on the BEDJET_COMMAND_UUID.
Device is in boost preset.
static const uint32_t MIN_NOTIFY_THROTTLE
uint16_t char_handle_name_
BedjetHeatMode
Optional heating strategies to use for climate::CLIMATE_MODE_HEAT.
void set_clock(uint8_t hour, uint8_t minute)
Attempt to set the BedJet device's clock to the specified time.
void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
void set_supports_current_temperature(bool supports_current_temperature)
void set_supported_custom_fan_modes(std::set< std::string > supported_custom_fan_modes)
void control(const climate::ClimateCall &call) override
The climate device only has the fan enabled, no heating or cooling is taking place.
uint16_t char_handle_cmd_
optional< time::RealTimeClock * > time_id_
ClimateDevice - This is the base class for all climate integrations.
HVACMode.HEAT is handled using BTN_HEAT (default)
std::unique_ptr< BedjetCodec > codec_