I have not defined anything myself, just using what the integration provides.
Maybe this is easier. The first two screenshots are both triggers in one automation (On), the third is a seperate automation (Off).
For the ‘On’ automation there also is a condition. This makes sure it doesn’t on when going from Standby to Unavailable or vice versa (which is a risk when using the ‘From’ as trigger).