Comparing pre-defined list with dynamic state attribute list

I am using the Minecraft Server integration to monitor which players are currently playing on a server I help administer.

I want to create an automation that will inform me when a new player logs on - by comparing a pre-defined list of existing players (which I will manually maintain) with a dynamic state attribute list provided by the integration.

Here’s an example of what the sensor looks like with nobody online:

sensor.gameserver_players_online
State: 0
State attributes:
unit_of_measurement: players
icon: mdi:account-multiple
friendly_name: Gameserver players online

(i.e. the players_list attribute doesn’t even appear)

And here’s an example of when 2 players are online:

sensor.gameserver_players_online
State: 2
State attributes:
unit_of_measurement: players
icon: mdi:account-multiple
friendly_name: Gameserver players online
players_list:
  - Fred
  - Alice

So based on this example, I would like help with how I could implement the following logic:

Trigger an automation when anyone other than already known players Fred, Mark, Sara & Tony are online (i.e. Alice would be the trigger here, as they would be an unknown/new user).

Hope that makes sense! TIA for any help.

The general method would be to trigger on the attribute’s value then use template conditions to check against your list. Depending on you end goal, you could also use something similar in a trigger-based template sensor.

See this related question:

Thanks Drew, I had not found that thread in my searches. It looks promising so I will try and adapt it.