How to get automation device in python script

Hey Guys,
New user here so be gentle.
I have a script that takes a device list as a parameter, I can get these devices in the script with this line:

devices = data.get("devices", [])

But what I get is a list of IDs:

2026-04-04 02:41:54.982 INFO (SyncWorker_1) [homeassistant.components.python_script] Executing hello_world.py: {'devices': ['79d52c620df009b06ae2585bd18e7772']}

So I am wondering how to get device class from that ID.
Or is that actually the class, just displayed as an ID?
In either case, where would this class be documented?
I’d like to bookmark a reference so I can study the properties and the methods.

Any help would be appreciated.

Regards, Mike.

Any specific reason to use a device instead of an entity?

Device IDs are unique the a device, so of you replace a device then you will get another device ID and you will then need to update all your scripts.

A decive controls and report state from a specific set of entities unde the device, so targeting those entities directly might be better and easier, and if you replace a device then you can rename the new entities to the replaced ones, so scripts do not have to be changed.

Also entity IDs contain the domain type in the first part of the entity ID.