Update fixture for ES20M 1.0.11 (#1215)

This commit is contained in:
Teemu R. 2024-11-11 10:31:13 +01:00 committed by GitHub
parent 66eb17057e
commit e5dd874333
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 8 deletions

View File

@ -44,6 +44,10 @@
],
"err_code": 0,
"ver": "1.0"
},
"get_current_brt": {
"err_code": 0,
"value": 16
}
},
"smartlife.iot.PIR": {
@ -55,11 +59,11 @@
0
],
"cold_time": 120000,
"enable": 0,
"enable": 1,
"err_code": 0,
"max_adc": 4095,
"min_adc": 0,
"trigger_index": 1,
"trigger_index": 0,
"version": "1.0"
}
},
@ -71,7 +75,7 @@
"fadeOnTime": 0,
"gentleOffTime": 10000,
"gentleOnTime": 3000,
"minThreshold": 5,
"minThreshold": 17,
"rampRate": 30
}
},
@ -88,9 +92,9 @@
"hw_ver": "1.0",
"icon_hash": "",
"latitude_i": 0,
"led_off": 0,
"led_off": 1,
"longitude_i": 0,
"mac": "28:87:BA:00:00:00",
"mac": "B0:A7:B9:00:00:00",
"mic_type": "IOT.SMARTPLUGSWITCH",
"model": "ES20M(US)",
"next_action": {
@ -98,7 +102,7 @@
},
"obd_src": "tplink",
"oemId": "00000000000000000000000000000000",
"on_time": 0,
"on_time": 6,
"preferred_state": [
{
"brightness": 100,
@ -117,8 +121,8 @@
"index": 3
}
],
"relay_state": 0,
"rssi": -54,
"relay_state": 1,
"rssi": -40,
"status": "new",
"sw_ver": "1.0.11 Build 240514 Rel.110351",
"updating": 0

View File

@ -9,6 +9,7 @@ from .conftest import dimmer_iot, handle_turn_on, turn_on
@dimmer_iot
async def test_set_brightness(dev):
await handle_turn_on(dev, False)
await dev.update()
assert dev.is_on is False
await dev.set_brightness(99)
@ -89,6 +90,7 @@ async def test_turn_off_transition(dev, mocker):
original_brightness = dev.brightness
await dev.turn_off(transition=1000)
await dev.update()
assert dev.is_off
assert dev.brightness == original_brightness
@ -126,6 +128,7 @@ async def test_set_dimmer_transition_to_off(dev, turn_on, mocker):
query_helper = mocker.spy(IotDimmer, "_query_helper")
await dev.set_dimmer_transition(0, 1000)
await dev.update()
assert dev.is_off
assert dev.brightness == original_brightness