mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-01 18:48:28 +02:00
New Midea IR component, improvements and fixes (#2847)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -23,12 +23,12 @@ class IrFollowMeData : public IrData {
|
||||
}
|
||||
|
||||
/* TEMPERATURE */
|
||||
uint8_t temp() const { return this->data_[4] - 1; }
|
||||
void set_temp(uint8_t val) { this->data_[4] = std::min(MAX_TEMP, val) + 1; }
|
||||
uint8_t temp() const { return this->get_value_(4) - 1; }
|
||||
void set_temp(uint8_t val) { this->set_value_(4, std::min(MAX_TEMP, val) + 1); }
|
||||
|
||||
/* BEEPER */
|
||||
bool beeper() const { return this->data_[3] & 128; }
|
||||
void set_beeper(bool val) { this->set_value_(3, 1, 7, val); }
|
||||
bool beeper() const { return this->get_value_(3, 128); }
|
||||
void set_beeper(bool val) { this->set_mask_(3, val, 128); }
|
||||
|
||||
protected:
|
||||
static const uint8_t MAX_TEMP = 37;
|
||||
|
||||
Reference in New Issue
Block a user