Searching Netflix movie to watch

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).

2 Likes

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:
  • 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