mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
Merge branch 'beta' into bump-1.20.0
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
namespace esphome {
|
||||
namespace midea_ac {
|
||||
|
||||
static const char *TAG = "midea_ac";
|
||||
static const char *const TAG = "midea_ac";
|
||||
|
||||
static void set_sensor(sensor::Sensor *sensor, float value) {
|
||||
if (sensor != nullptr && (!sensor->has_state() || sensor->get_raw_state() != value))
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/midea_dongle/midea_dongle.h"
|
||||
#include "esphome/components/climate/climate.h"
|
||||
#include "esphome/components/midea_dongle/midea_dongle.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace esphome {
|
||||
namespace midea_ac {
|
||||
|
||||
static const char *TAG = "midea_ac";
|
||||
static const char *const TAG = "midea_ac";
|
||||
const std::string MIDEA_SILENT_FAN_MODE = "silent";
|
||||
const std::string MIDEA_TURBO_FAN_MODE = "turbo";
|
||||
const std::string MIDEA_FREEZE_PROTECTION_PRESET = "freeze protection";
|
||||
|
||||
@@ -102,8 +102,11 @@ class PropertiesFrame : public midea_dongle::BaseFrame {
|
||||
void set_sleep_mode(bool state) { this->set_bytemask_(20, 0x01, state); }
|
||||
|
||||
/* TURBO MODE */
|
||||
bool get_turbo_mode() const { return this->pbuf_[18] & 0x20; }
|
||||
void set_turbo_mode(bool state) { this->set_bytemask_(18, 0x20, state); }
|
||||
bool get_turbo_mode() const { return this->pbuf_[18] & 0x20 || this->pbuf_[20] & 0x02; }
|
||||
void set_turbo_mode(bool state) {
|
||||
this->set_bytemask_(18, 0x20, state);
|
||||
this->set_bytemask_(20, 0x02, state);
|
||||
}
|
||||
|
||||
/* FREEZE PROTECTION */
|
||||
bool get_freeze_protection_mode() const { return this->pbuf_[31] & 0x80; }
|
||||
|
||||
Reference in New Issue
Block a user