mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 08:20:21 +00:00
[fan] Add tests for fan.turn_on action field combinations (#16125)
This commit is contained in:
@@ -57,3 +57,34 @@ binary_sensor:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
# Exercise fan.turn_on with various field combinations so the
|
||||
# TurnOnAction codegen paths get build coverage.
|
||||
button:
|
||||
- platform: template
|
||||
name: "Fan Speed Only"
|
||||
on_press:
|
||||
- fan.turn_on:
|
||||
id: test_fan
|
||||
speed: 2
|
||||
- platform: template
|
||||
name: "Fan Oscillating + Direction"
|
||||
on_press:
|
||||
- fan.turn_on:
|
||||
id: test_fan
|
||||
oscillating: true
|
||||
direction: REVERSE
|
||||
- platform: template
|
||||
name: "Fan All Fields"
|
||||
on_press:
|
||||
- fan.turn_on:
|
||||
id: test_fan
|
||||
oscillating: false
|
||||
speed: 3
|
||||
direction: FORWARD
|
||||
- platform: template
|
||||
name: "Fan Lambda Speed"
|
||||
on_press:
|
||||
- fan.turn_on:
|
||||
id: test_fan
|
||||
speed: !lambda 'return 1;'
|
||||
|
||||
Reference in New Issue
Block a user