ESPHome  2021.11.3
anova.h
Go to the documentation of this file.
1 #pragma once
2 
7 #include "anova_base.h"
8 
9 #ifdef USE_ESP32
10 
11 #include <esp_gattc_api.h>
12 
13 namespace esphome {
14 namespace anova {
15 
17 
18 static const uint16_t ANOVA_SERVICE_UUID = 0xFFE0;
19 static const uint16_t ANOVA_CHARACTERISTIC_UUID = 0xFFE1;
20 
22  public:
23  void setup() override;
24  void loop() override;
25  void update() override;
26  void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
27  esp_ble_gattc_cb_param_t *param) override;
28  void dump_config() override;
29  float get_setup_priority() const override { return setup_priority::DATA; }
33  traits.set_supports_heat_mode(true);
37  return traits;
38  }
39  void set_unit_of_measurement(const char *);
40 
41  protected:
42  std::unique_ptr<AnovaCodec> codec_;
43  void control(const climate::ClimateCall &call) override;
44  uint16_t char_handle_;
47 };
48 
49 } // namespace anova
50 } // namespace esphome
51 
52 #endif
std::unique_ptr< AnovaCodec > codec_
Definition: anova.h:42
This class is used to encode all control actions on a climate device.
Definition: climate.h:33
void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
Definition: anova.cpp:51
void set_visual_temperature_step(float temperature_step)
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:18
void control(const climate::ClimateCall &call) override
Definition: anova.cpp:22
uint16_t char_handle_
Definition: anova.h:44
This class contains all static data for climate devices.
void set_visual_min_temperature(float visual_min_temperature)
void set_unit_of_measurement(const char *)
Definition: anova.cpp:129
This class simplifies creating components that periodically check a state.
Definition: component.h:234
climate::ClimateTraits traits() override
Definition: anova.h:30
void update() override
Definition: anova.cpp:131
void setup() override
Definition: anova.cpp:15
void dump_config() override
Definition: anova.cpp:13
void set_visual_max_temperature(float visual_max_temperature)
void loop() override
Definition: anova.cpp:20
float get_setup_priority() const override
Definition: anova.h:29
uint8_t current_request_
Definition: anova.h:45
Library based on https://github.com/miguelbalboa/rfid and adapted to ESPHome by . ...
Definition: a4988.cpp:4
void set_supports_current_temperature(bool supports_current_temperature)
ClimateDevice - This is the base class for all climate integrations.
Definition: climate.h:167