From 9f915227f6312ae80906b767b2739731936d3d59 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 4 May 2018 09:29:55 -0400 Subject: [PATCH] Add media player websocket command (#5) * Add media player websocket command * Add periods commit back --- docs/external_api_websocket.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/external_api_websocket.md b/docs/external_api_websocket.md index 5c633873..0ee35ebf 100644 --- a/docs/external_api_websocket.md +++ b/docs/external_api_websocket.md @@ -355,6 +355,34 @@ The server will respond with a result message containing the thumbnail. } ``` +### Fetching media player thumbnails + +_Introduced in Home Assistant 0.69._ + +Fetch a base64 encoded thumbnail picture for a media player. + +```json +{ + "id": 19, + "type": "media_player_thumbnail", + "entity_id": "media_player.living_room" +} +``` + +The server will respond with the image encoded via base64. + +```json +{ + "id": 19, + "type": "result", + "success": true, + "result": { + "content_type": "image/jpeg", + "content": "" + } +} +``` + ## Error handling If an error occurs, the `success` key in the `result` message will be set to `false`. It will contain an `error` key containing an object with two keys: `code` and `message`.