Skip to content

Commit 2f8e6e3

Browse files
committed
hts221: Add hardware test for auto-trigger after poweroff.
1 parent 7560009 commit 2f8e6e3

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/scenarios/hts221.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,19 @@ tests:
8585
expect_not_none: true
8686
mode: [mock, hardware]
8787

88+
- name: "Auto-trigger after poweroff"
89+
action: hardware_script
90+
script: |
91+
from machine import I2C
92+
from hts221.device import HTS221
93+
i2c = I2C(1)
94+
sensor = HTS221(i2c)
95+
sensor.poweroff()
96+
t = sensor.temperature()
97+
result = 10.0 <= t <= 45.0
98+
expect_true: true
99+
mode: [hardware]
100+
88101
- name: "Temperature feels correct"
89102
action: manual
90103
display:

0 commit comments

Comments
 (0)