diff options
Diffstat (limited to 'control/actions.cpp')
-rw-r--r-- | control/actions.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/control/actions.cpp b/control/actions.cpp index b1eb9be..6eda2a6 100644 --- a/control/actions.cpp +++ b/control/actions.cpp @@ -81,6 +81,24 @@ Action call_actions_based_on_timer(Timer&& tConf, std::vector<Action>&& actions) }; } +void default_floor_on_missing_owner(Zone& zone, const Group& group) +{ + auto services = zone.getGroupServices(&group); + auto defFloor = std::any_of( + services.begin(), + services.end(), + [](const auto& s) + { + return !std::get<hasOwnerPos>(s); + }); + if (defFloor) + { + zone.setFloor(zone.getDefFloor()); + } + // Update fan control floor change allowed + zone.setFloorChangeAllow(&group, !defFloor); +} + void set_request_speed_base_with_max(control::Zone& zone, const Group& group) { |