diff --git a/components/panasonic_heatpump/select/panasonic_heatpump_select.cpp b/components/panasonic_heatpump/select/panasonic_heatpump_select.cpp index 64c744e..2fdf519 100644 --- a/components/panasonic_heatpump/select/panasonic_heatpump_select.cpp +++ b/components/panasonic_heatpump/select/panasonic_heatpump_select.cpp @@ -58,38 +58,38 @@ void PanasonicHeatpumpSelect::publish_new_state(const std::vector& data case SelectIds::CONF_SET9: new_state = PanasonicDecode::getTextState(PanasonicDecode::OperationMode, PanasonicDecode::getOperationMode(data[6])); - if (this->has_state() && this->state == new_state) + if (this->has_state() && this->current_option() == new_state) return; break; case SelectIds::CONF_SET4: new_state = PanasonicDecode::getTextState(PanasonicDecode::PowerfulMode, PanasonicDecode::getBit6and7and8(data[7])); - if (this->has_state() && this->state == new_state) + if (this->has_state() && this->current_option() == new_state) return; break; case SelectIds::CONF_SET3: new_state = PanasonicDecode::getTextState(PanasonicDecode::QuietMode, PanasonicDecode::getBit3and4and5(data[7])); - if (this->has_state() && this->state == new_state) + if (this->has_state() && this->current_option() == new_state) return; break; case SelectIds::CONF_SET2: new_state = PanasonicDecode::getTextState(PanasonicDecode::HolidayState, PanasonicDecode::getBit3and4(data[5])); - if (this->has_state() && this->state == new_state) + if (this->has_state() && this->current_option() == new_state) return; break; case SelectIds::CONF_SET17: new_state = PanasonicDecode::getTextState(PanasonicDecode::ZoneState, PanasonicDecode::getBit1and2(data[6])); - if (this->has_state() && this->state == new_state) + if (this->has_state() && this->current_option() == new_state) return; break; case SelectIds::CONF_SET26: new_state = PanasonicDecode::getTextState(PanasonicDecode::ExtPadHeaterType, PanasonicDecode::getBit3and4(data[25])); - if (this->has_state() && this->state == new_state) + if (this->has_state() && this->current_option() == new_state) return; break; case SelectIds::CONF_SET35: new_state = PanasonicDecode::getTextState(PanasonicDecode::BivalentMode, PanasonicDecode::getBit5and6(data[26])); - if (this->has_state() && this->state == new_state) + if (this->has_state() && this->current_option() == new_state) return; break; default: