From f58c76c8837fd6a7cdfa16ee682bffa293ad2a7c Mon Sep 17 00:00:00 2001 From: Manu <4445816+tr4nt0r@users.noreply.github.com> Date: Tue, 8 Jul 2025 10:16:10 +0200 Subject: [PATCH] Fix error when `personalDetail` is missing in PlayStation Network integration (#148389) --- homeassistant/components/playstation_network/sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/playstation_network/sensor.py b/homeassistant/components/playstation_network/sensor.py index f4a634d5fb5..cfd81fe4033 100644 --- a/homeassistant/components/playstation_network/sensor.py +++ b/homeassistant/components/playstation_network/sensor.py @@ -156,9 +156,9 @@ class PlaystationNetworkSensorEntity( def entity_picture(self) -> str | None: """Return the entity picture to use in the frontend, if any.""" if self.entity_description.key is PlaystationNetworkSensor.ONLINE_ID and ( - profile_pictures := self.coordinator.data.profile["personalDetail"].get( - "profilePictures" - ) + profile_pictures := self.coordinator.data.profile.get( + "personalDetail", {} + ).get("profilePictures") ): return next( (pic.get("url") for pic in profile_pictures if pic.get("size") == "xl"),