From 5cd75875484aaf656c02ed1aac81b009146abe1a Mon Sep 17 00:00:00 2001 From: wrfz <77174685+wrfz@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:38:31 +0100 Subject: [PATCH] Disable optimized_defrosting when operating_mode select is changed to summer --- components/daikin_rotex_can/daikin_rotex_can.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/daikin_rotex_can/daikin_rotex_can.cpp b/components/daikin_rotex_can/daikin_rotex_can.cpp index a364482..3edd477 100644 --- a/components/daikin_rotex_can/daikin_rotex_can.cpp +++ b/components/daikin_rotex_can/daikin_rotex_can.cpp @@ -178,6 +178,17 @@ bool DaikinRotexCanComponent::on_custom_select(std::string const& id, uint8_t va } m_optimized_defrosting.save(value); return true; + } else if (id == BETRIEBS_MODUS) { + CanSelect* p_betriebs_modus = m_entity_manager.get_select(BETRIEBS_MODUS); + CanSelect* p_optimized_defrosting = m_entity_manager.get_select(OPTIMIZED_DEFROSTING); + if (p_betriebs_modus != nullptr && p_betriebs_modus->state == STATE_SUMMER && p_optimized_defrosting != nullptr) { + ESP_LOGI(TAG, "on_custom_select(%s, %d) => set m_optimized_defrosting to false", id.c_str(), value); + + p_optimized_defrosting->publish_select_key(0x0); + m_optimized_defrosting.save(0x0); + + return false; // process sendSet(...) + } } return false; }