Automation Notifiaction Variables

I have several devices from which I would like to receive a notification via an automation or a script when the status changes. Does anyone have any idea which variables I need to store in the script or automation so that I can see which device has changed its status?

I would be grateful for any tips, thank you very much!