Can’t help with node red but in home assistant I’d just use a wait_template instead of a fixed delay.
wait_template: "{{ not is_state('media_player.your_sonos, 'playing') }}"
Can’t help with node red but in home assistant I’d just use a wait_template instead of a fixed delay.
wait_template: "{{ not is_state('media_player.your_sonos, 'playing') }}"