State and status different for Roomba integration?

I created an automation, which should turn of the lights when my roomba vacuumcleaner is ready.

Alias: Cleaning done in evening
description: “”

  • trigger:
    • platform: state
      entity_id:
      • vacuum.maatje
        attribute: status
        from: returning
        to: docked
  • condition:
    • condition: time
      after: “23:00:00”
      before: “05:00:00”
  • action:
    • action: light.turn_off
      metadata: {}
      data: {}
      target:
      entity_id: light.woonkamer
      mode: single

However, this automation doesn’t work. I checked the state of the entity, which looks ok. But the automation only works on the status, not on the state.

The status stays at “null”. If i manually change the status, my automation works. But Roomba only updates the state, not the status. How can i change this?

I found the issue. I removed the line “attribute: status” from the trigger section, this resultated in the automation checking only the state, not the status.

This solved my problem!