Skip to content

Commit

Permalink
Disable optimized_defrosting when operating_mode select is changed to…
Browse files Browse the repository at this point in the history
… summer
  • Loading branch information
wrfz committed Jan 16, 2025
1 parent 2860ed9 commit 5cd7587
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/daikin_rotex_can/daikin_rotex_can.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5cd7587

Please sign in to comment.