@@ -311,7 +311,8 @@ async def test_laundry_wash_scenario(
311311 hass , "sensor.washing_machine_target_temperature" , "unknown" , step
312312 )
313313 check_sensor_state (hass , "sensor.washing_machine_spin_speed" , "unknown" , step )
314- check_sensor_state (hass , "sensor.washing_machine_remaining_time" , "0" , step )
314+ # OFF -> remaining forced to unknown
315+ check_sensor_state (hass , "sensor.washing_machine_remaining_time" , "unknown" , step )
315316 # OFF -> elapsed forced to unknown (some devices continue reporting last value of last cycle)
316317 check_sensor_state (hass , "sensor.washing_machine_elapsed_time" , "unknown" , step )
317318
@@ -347,8 +348,8 @@ async def test_laundry_wash_scenario(
347348 check_sensor_state (hass , "sensor.washing_machine_program_phase" , "main_wash" , step )
348349 check_sensor_state (hass , "sensor.washing_machine_target_temperature" , "30.0" , step )
349350 check_sensor_state (hass , "sensor.washing_machine_spin_speed" , "1200" , step )
351+ # IN_USE -> elapsed, remaining time from API (normal case)
350352 check_sensor_state (hass , "sensor.washing_machine_remaining_time" , "105" , step )
351- # IN_USE -> elapsed time from API (normal case)
352353 check_sensor_state (hass , "sensor.washing_machine_elapsed_time" , "12" , step )
353354
354355 # Simulate rinse hold phase
@@ -373,8 +374,8 @@ async def test_laundry_wash_scenario(
373374 check_sensor_state (hass , "sensor.washing_machine_program_phase" , "rinse_hold" , step )
374375 check_sensor_state (hass , "sensor.washing_machine_target_temperature" , "30.0" , step )
375376 check_sensor_state (hass , "sensor.washing_machine_spin_speed" , "1200" , step )
377+ # RINSE HOLD -> elapsed, remaining time from API (normal case)
376378 check_sensor_state (hass , "sensor.washing_machine_remaining_time" , "8" , step )
377- # RINSE HOLD -> elapsed time from API (normal case)
378379 check_sensor_state (hass , "sensor.washing_machine_elapsed_time" , "109" , step )
379380
380381 # Simulate program ended
@@ -401,6 +402,7 @@ async def test_laundry_wash_scenario(
401402 )
402403 check_sensor_state (hass , "sensor.washing_machine_target_temperature" , "30.0" , step )
403404 check_sensor_state (hass , "sensor.washing_machine_spin_speed" , "1200" , step )
405+ # PROGRAM_ENDED -> remaining time forced to 0
404406 check_sensor_state (hass , "sensor.washing_machine_remaining_time" , "0" , step )
405407 # PROGRAM_ENDED -> elapsed time kept from last program (some devices immediately go to 0)
406408 check_sensor_state (hass , "sensor.washing_machine_elapsed_time" , "109" , step )
@@ -433,8 +435,8 @@ async def test_laundry_wash_scenario(
433435 )
434436 check_sensor_state (hass , "sensor.washing_machine_target_temperature" , "40.0" , step )
435437 check_sensor_state (hass , "sensor.washing_machine_spin_speed" , "1200" , step )
438+ # PROGRAMMED -> elapsed, remaining time from API (normal case)
436439 check_sensor_state (hass , "sensor.washing_machine_remaining_time" , "119" , step )
437- # PROGRAMMED -> elapsed time from API (normal case)
438440 check_sensor_state (hass , "sensor.washing_machine_elapsed_time" , "0" , step )
439441
440442
@@ -457,8 +459,8 @@ async def test_laundry_dry_scenario(
457459 check_sensor_state (hass , "sensor.tumble_dryer_program" , "no_program" , step )
458460 check_sensor_state (hass , "sensor.tumble_dryer_program_phase" , "not_running" , step )
459461 check_sensor_state (hass , "sensor.tumble_dryer_drying_step" , "unknown" , step )
460- check_sensor_state ( hass , "sensor.tumble_dryer_remaining_time" , "0" , step )
461- # OFF -> elapsed forced to unknown (some devices continue reporting last value of last cycle )
462+ # OFF -> elapsed, remaining forced to unknown (some devices continue reporting last value of last cycle )
463+ check_sensor_state ( hass , "sensor.tumble_dryer_remaining_time" , " unknown" , step )
462464 check_sensor_state (hass , "sensor.tumble_dryer_elapsed_time" , "unknown" , step )
463465
464466 # Simulate program started
@@ -486,8 +488,8 @@ async def test_laundry_dry_scenario(
486488 check_sensor_state (hass , "sensor.tumble_dryer_program" , "minimum_iron" , step )
487489 check_sensor_state (hass , "sensor.tumble_dryer_program_phase" , "drying" , step )
488490 check_sensor_state (hass , "sensor.tumble_dryer_drying_step" , "normal" , step )
491+ # IN_USE -> elapsed, remaining time from API (normal case)
489492 check_sensor_state (hass , "sensor.tumble_dryer_remaining_time" , "49" , step )
490- # IN_USE -> elapsed time from API (normal case)
491493 check_sensor_state (hass , "sensor.tumble_dryer_elapsed_time" , "20" , step )
492494
493495 # Simulate program end
@@ -511,6 +513,7 @@ async def test_laundry_dry_scenario(
511513 check_sensor_state (hass , "sensor.tumble_dryer_program" , "minimum_iron" , step )
512514 check_sensor_state (hass , "sensor.tumble_dryer_program_phase" , "finished" , step )
513515 check_sensor_state (hass , "sensor.tumble_dryer_drying_step" , "normal" , step )
516+ # PROGRAM_ENDED -> remaining time forced to 0
514517 check_sensor_state (hass , "sensor.tumble_dryer_remaining_time" , "0" , step )
515518 # PROGRAM_ENDED -> elapsed time kept from last program (some devices immediately go to 0)
516519 check_sensor_state (hass , "sensor.tumble_dryer_elapsed_time" , "20" , step )
0 commit comments