Detect state change text

I’m using the Roomba integration and want to send a notification when the Roomba state changes to ‘Returning to dock’.

This configuration is never triggered, even though I can see the state history changes match exactly. The notification part works fine, it’s the trigger that’s not working.

How do I start an automation on the state text value? The YAML below was generated by the UI.

Thank you!

alias: Roomba returning to dock PushoverAlexa
description: ''
trigger:
  - platform: state
    entity_id:
      - vacuum.roomba
    to: Returning to dock
condition: []
action:
  - service: notify.pushoveralexa
    data:
      message: Roomba is going back to base
mode: single

Check the underlying state value in the developer tools and use that. States usually get translated (not meant in only the grammatical sense) for display purposes: Take the weather integration as an example, or the long list of binary sensors. Could even be different languages, but the internal state is what matters.

Perfect! That was it, thanks.

The string I needed was ‘returning’.

cheers!