mirror of
https://github.com/esphome/esphome.git
synced 2026-09-22 12:38:40 +00:00
Merge branch 'dev' into partition-table-ota
This commit is contained in:
@@ -112,7 +112,7 @@ TEST(ProtoMacVarint, AllOnes) { verify_mac(0xFFFFFFFFFFFFULL, 7); } // F
|
||||
|
||||
// 100 deterministic-random 48-bit MACs to catch regressions across the space.
|
||||
TEST(ProtoMacVarint, RandomSample) {
|
||||
// NOLINTNEXTLINE(cert-msc32-c,cert-msc51-cpp) -- intentional fixed seed for reproducibility.
|
||||
// NOLINTNEXTLINE(cert-msc32-c,cert-msc51-cpp,bugprone-random-generator-seed) -- fixed seed for reproducibility
|
||||
std::mt19937_64 rng(0xC0FFEE);
|
||||
for (int i = 0; i < 100; i++) {
|
||||
uint64_t mac = rng() & 0xFFFFFFFFFFFFULL;
|
||||
|
||||
@@ -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;'
|
||||
|
||||
@@ -442,6 +442,20 @@ valve:
|
||||
state: CLOSED
|
||||
stop_action:
|
||||
- logger.log: stop_action
|
||||
# Exercise valve.control with various field combinations so the
|
||||
# ControlAction codegen paths get build coverage.
|
||||
- valve.control:
|
||||
id: template_valve
|
||||
stop: true
|
||||
- valve.control:
|
||||
id: template_valve
|
||||
position: 50%
|
||||
- valve.control:
|
||||
id: template_valve
|
||||
state: OPEN
|
||||
- valve.control:
|
||||
id: template_valve
|
||||
position: !lambda 'return 0.25f;'
|
||||
optimistic: true
|
||||
|
||||
text:
|
||||
|
||||
Reference in New Issue
Block a user