本帖最后由 needs 于 2019-9-13 01:56 编辑
看了homeassistant的plex插件文档,发现可以控制播放影片的服务存在
[td]Service data attribute | Optional | Description | Example | entity_id | no | entity_id of the client | media_player.theater_plex | media_content_id | no | Quote escaped JSON with library_name, show_name, season_number, episode_number, shuffle (0 or 1). | { \“library_name\” : \“Adult TV\”, \“show_name\” : \“Rick and Morty\”, \“season_number\” : 2, \“episode_number\” : 5, \“shuffle\”: \“0\” } | media_content_type | no | Type of media to play, in this case EPISODE | EPISODE |
按照文档测试,调用服务media_player.play_media,下面代码自动转义了斜杠,实际是有的,media_content_id是json格式
{
"entity_id": "media_player.plex_ke_ting",
"media_content_id": "{ "library_name": "电视节目","show_name": "Marvel's Agents of S.H.I.E.L.D.","season_number":6,"episode_number":10,"shuffle": "0"}",
"media_content_type": "EPISODE"
}
然而什么都没有发生,查看日志也无任何报错输出,求助大佬,看看有没有这方面的东西
|