@@ -159,14 +159,14 @@ def mock_read(attributes, manufacturer=None):
159
159
@pytest .mark .parametrize (
160
160
"firmware, pct_device, pct_correct, expected_pct_updates, expect_log_warning" ,
161
161
(
162
- ("1.0.024" , 50 , 100 , 1 , False ), # old firmware, doubling
163
- ("2.3.075" , 50 , 100 , 1 , False ), # old firmware, doubling
164
- ("2.4.5" , 50 , 50 , 2 , False ), # new firmware, no doubling
165
- ("3.0.0" , 50 , 50 , 2 , False ), # new firmware, no doubling
166
- ("24.4.5" , 50 , 50 , 2 , False ), # new firmware, no doubling
167
- ("invalid_fw_string_1" , 50 , 50 , 2 , False ), # treated as new, no doubling
168
- ("invalid.fw.string.2" , 50 , 50 , 2 , True ), # treated as new, no doubling + log
169
- ("" , 50 , 100 , 1 , False ), # treated as old fw, doubling
162
+ ("1.0.024" , 50 , 100 , 2 , False ), # old firmware, doubling
163
+ ("2.3.075" , 50 , 100 , 2 , False ), # old firmware, doubling
164
+ ("2.4.5" , 50 , 50 , 1 , False ), # new firmware, no doubling
165
+ ("3.0.0" , 50 , 50 , 1 , False ), # new firmware, no doubling
166
+ ("24.4.5" , 50 , 50 , 1 , False ), # new firmware, no doubling
167
+ ("invalid_fw_string_1" , 50 , 50 , 1 , False ), # treated as new, no doubling
168
+ ("invalid.fw.string.2" , 50 , 50 , 1 , True ), # treated as new, no doubling + log
169
+ ("" , 50 , 50 , 1 , False ), # treated as new fw, no doubling
170
170
),
171
171
)
172
172
async def test_double_power_config_firmware (
@@ -206,10 +206,10 @@ def mock_read(attributes, manufacturer=None):
206
206
)
207
207
208
208
with p1 as mock_task , p2 as request_mock :
209
- # update battery percentage with no firmware in attr cache, check pct doubled for now
209
+ # update battery percentage with no firmware in attr cache, check pct not doubled for now
210
210
power_cluster .update_attribute (battery_pct_id , pct_device )
211
211
assert len (power_listener .attribute_updates ) == 1
212
- assert power_listener .attribute_updates [0 ] == (battery_pct_id , pct_device * 2 )
212
+ assert power_listener .attribute_updates [0 ] == (battery_pct_id , pct_device )
213
213
214
214
# but also check that sw_build_id read is requested in the background for next update
215
215
assert mock_task .call_count == 1
0 commit comments