Add mediadescription for channel media type (#13434)

This commit is contained in:
Michel van de Wetering 2022-09-03 11:44:02 +02:00 committed by GitHub
parent a9d1feb196
commit 43f9c9ebc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,7 @@ interface MediaPlayerEntityAttributes extends HassEntityAttributeBase {
media_duration?: number;
media_position?: number;
media_title?: string;
media_channel?: string;
icon?: string;
entity_picture_local?: string;
is_volume_muted?: boolean;
@ -235,6 +236,9 @@ export const computeMediaDescription = (
}
}
break;
case "channel":
secondaryTitle = stateObj.attributes.media_channel!;
break;
default:
secondaryTitle = stateObj.attributes.app_name || "";
}