[mitsubishi_cn105] Use register_apply_action for vane.control (#19477)

This commit is contained in:
J. Nick Koston
2026-09-23 17:27:01 -05:00
committed by GitHub
parent 2ddc6a0741
commit 20703f32bb
4 changed files with 10 additions and 84 deletions
@@ -37,4 +37,4 @@ esphome:
- mitsubishi_cn105.vane.control:
id: ac
vertical:
direction: !lambda return esphome::mitsubishi_cn105::VERTICAL_VANE_MODE_SWING;
direction: !lambda return VERTICAL_VANE_MODE_SWING;
@@ -63,12 +63,4 @@ TEST(MitsubishiCN105ComponentTests, VaneCallAppliesVerticalDirection) {
EXPECT_EQ(hub.status().vane_mode, MitsubishiCN105::VaneMode::POSITION_5);
}
TEST(MitsubishiCN105ComponentTests, VaneControlActionAppliesConfiguredFields) {
MitsubishiCN105Component hub;
VaneControlAction<> action(&hub, [](VaneCall &call) { call.vertical.set_direction(VERTICAL_VANE_MODE_SWING); });
action.play();
EXPECT_EQ(hub.status().vane_mode, MitsubishiCN105::VaneMode::SWING);
}
} // namespace esphome::mitsubishi_cn105::testing