Hey guys,
I create a Python script in order to automatize the research of movie to watch on Netflix. You just need to type the title (or use the vocal comand).
can you show an example of this working, maybe Iβm missing its helpfulness
For example you could use the conversation trigger βShow me Magnolia on Netflixβ and the script is going to automatically search and start it.
In the automation you need to use a variable (in order to be able to input any title) and use the correct comand of your TV for getting the specific title menu.
This is something that I saw here https://www.youtube.com/watch?v=eMQnceKn154 at 06:41 and I wanted to replicate (also a lot of users were asking for it).
At the moment I donβt have hardware for vocal input (i.e. Home Assistant Voice Preview Edition) so I tested just using an input text, but I can anyway figure out an automation using a vocal input as follow:
alias: TV_Search movie Netflix
description: ββ
triggers:
- trigger: conversation
command:- Search {title} su Netflix
conditions:
actions:
- Search {title} su Netflix
- action: media_player.select_source
metadata: {}
data:
source: com.netflix.ninja
target:
entity_id: media_player.fire_tv_adb - delay:
hours: 0
minutes: 0
seconds: 4
milliseconds: 0 - action: androidtv.adb_command
metadata: {}
data:
command: UP
target:
device_id: your_id - action: androidtv.adb_command
metadata: {}
data:
command: LEFT
target:
device_id: your_id - action: androidtv.adb_command
metadata: {}
data:
command: CENTER
target:
device_id: your_id - delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0 - variables:
title_to_search: β{{ trigger.slots.title | string | trim | lower }}β - action: pyscript.netflix_search
data:
entity_id: media_player.fire_tv_adb
text: β{{ title_to_search }}β - variables:
conversation_response: β{{ "I proceed searching β{0}β on Netflix".format(title_to_search.title()) }}β - set_conversation_response: β{{ conversation_response }}β
mode: single