Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions homeassistant/components/youtube/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ async def async_get_config_entry_diagnostics(
coordinator = entry.runtime_data
sensor_data: dict[str, Any] = {}
for channel_id, channel_data in coordinator.data.items():
channel_data.get(ATTR_LATEST_VIDEO, {}).pop(ATTR_DESCRIPTION)
sensor_data[channel_id] = channel_data
channel_copy = dict(channel_data)
if latest_video := channel_copy.get(ATTR_LATEST_VIDEO):
channel_copy[ATTR_LATEST_VIDEO] = {
Comment on lines 17 to +20
key: value
for key, value in latest_video.items()
if key != ATTR_DESCRIPTION
}
sensor_data[channel_id] = channel_copy
Comment on lines +18 to +25
return sensor_data