Add media player websocket command (#5)

* Add media player websocket command

* Add periods commit back
This commit is contained in:
Paulus Schoutsen 2018-05-04 09:29:55 -04:00 committed by GitHub
parent 4f5fa21425
commit 9f915227f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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": "<base64 encoded image>"
}
}
```
## 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`.