Using device name in Rule Machine notification

That rule is working as documented: the device variable refers to the trigger event. Conditionals in your actions, contrary to what sounds like your expecations, do not affect these variables. (You can read more about what actually happens in the docs I linked to above.) Your trigger event is the mode changes.

webCoRE, also built in, might be able to do what you want with a bit less effort, but I rarely use that these days aside from testing things. With Rule Machine, you'd need to check the states yourself and append text to a string variable to make it say what you want. This can get tedious, so personally, I wrote a custom app instead and shared it with the community here. You might want to look, as it sounds like your goals are similar:

But if you don't want to use custom code, there's an example there too of the rule it replaced for me. Something like that will probably work for you, too.

Hope this helps!