Proper Steam game names and small fixes (#11182)
Proper Steam game names and small fixes (#11182)

* Use constant for offline state

* Use constant for no game name

* Rename trade and play constant their proper names

Trade and Play are not the correct names for the states. For instance
Play might be seens as the user is actually is playing, which is not
correct as there is no such state is returned from the Steam API.
Just having "trade" does not say much about what is happening and
might be misintepreted that the user is currently trading, which is not
correct either.

We instead use the names from the underlying library for naming the
states [1]

[1] https://github.com/Lagg/steamodd/blob/2e518ad84f3afce631d5d7eca3af0f85b5330b5b/steam/user.py#L109

* Get the proper game name if no extra info is given from the api

The third `current_game` parameter that was used before hold
extra information about the game that is being played. This might
contain the game name, it might also be empty. The correct way to
get the game name is to fetch it from the API depending on the
game id that might be returned in the `current_game` attribute if
the user is playing a game.

To not break existing implementations we keep the functionality
to first go with the extra information and only then fetch the proper
game name.

* Refactor getting game name to its own function

This cleans up the code and removed "ugly" else statements
from the sensor and makes the game fetching easier to read.

* Let state constant values be lower snake case

* Return None instead of 'None' when no current game exists

* Initialize steam app list only once to benefit form caching

* Return None as state attributes if no current game is present

tboyce1/home-assistant,Teagan42/home-assistant,jnewland/home-assistant,ewandor/home-assistant,jamespcole/home-assistant,nugget/home-assistant,jabesq/home-assistant,ewandor/home-assistant,rohitranjan1991/home-assistant,sdague/home-assistant,jabesq/home-assistant,aronsky/home-assistant,PetePriority/home-assistant,sdague/home-assistant,tinloaf/home-assistant,auduny/home-assistant,jawilson/home-assistant,jawilson/home-assistant,persandstrom/home-assistant,partofthething/home-assistant,home-assistant/home-assistant,toddeye/home-assistant,qedi-r/home-assistant,HydrelioxGitHub/home-assistant,Teagan42/home-assistant,nugget/home-assistant,nkgilley/home-assistant,mKeRix/home-assistant,DavidLP/home-assistant,FreekingDean/home-assistant,jnewland/home-assistant,tboyce1/home-assistant,aronsky/home-assistant,balloob/home-assistant,pschmitt/home-assistant,MartinHjelmare/home-assistant,home-assistant/home-assistant,titilambert/home-assistant,jnewland/home-assistant,aequitas/home-assistant,lukas-hetzenecker/home-assistant,postlund/home-assistant,leppa/home-assistant,kennedyshead/home-assistant,MartinHjelmare/home-assistant,molobrakos/home-assistant,kennedyshead/home-assistant,lukas-hetzenecker/home-assistant,Cinntax/home-assistant,rohitranjan1991/home-assistant,Cinntax/home-assistant,joopert/home-assistant,tboyce1/home-assistant,fbradyirl/home-assistant,toddeye/home-assistant,w1ll1am23/home-assistant,sander76/home-assistant,mKeRix/home-assistant,molobrakos/home-assistant,Danielhiversen/home-assistant,qedi-r/home-assistant,jamespcole/home-assistant,DavidLP/home-assistant,mezz64/home-assistant,fbradyirl/home-assistant,DavidLP/home-assistant,adrienbrault/home-assistant,adrienbrault/home-assistant,jamespcole/home-assistant,rohitranjan1991/home-assistant,HydrelioxGitHub/home-assistant,auduny/home-assistant,partofthething/home-assistant,fbradyirl/home-assistant,tchellomello/home-assistant,titilambert/home-assistant,robbiet480/home-assistant,persandstrom/home-assistant,PetePriority/home-assistant,molobrakos/home-assistant,turbokongen/home-assistant,pschmitt/home-assistant,turbokongen/home-assistant,tboyce1/home-assistant,PetePriority/home-assistant,nkgilley/home-assistant,mezz64/home-assistant,soldag/home-assistant,tboyce021/home-assistant,auduny/home-assistant,MartinHjelmare/home-assistant,GenericStudent/home-assistant,nugget/home-assistant,balloob/home-assistant,robbiet480/home-assistant,tchellomello/home-assistant,tinloaf/home-assistant,aequitas/home-assistant,postlund/home-assistant,mKeRix/home-assistant,Danielhiversen/home-assistant,jabesq/home-assistant,mKeRix/home-assistant,leppa/home-assistant,soldag/home-assistant,balloob/home-assistant,GenericStudent/home-assistant,sander76/home-assistant,w1ll1am23/home-assistant,joopert/home-assistant,ewandor/home-assistant,tinloaf/home-assistant,FreekingDean/home-assistant,tboyce021/home-assistant,aequitas/home-assistant,persandstrom/home-assistant,HydrelioxGitHub/home-assistant