The androidtv platform for the media_player integration does not support platform setup. Please remove it from your config

I am using some lovelace buttons to turn the NVidia Shield on or off and everything is working as it should even though this error is still showing in the logs.
I don’t understand what I need to do/remove from the configuration to get rid of the error.

In the configuration.yaml I have added the following section:

# Integrate NVIDIA Shield TV
media_player:
  # Use the Python ADB implementation
  - platform: androidtv
    name: Nvidia Shield TV
    device_class: androidtv
    host: X.X.X.X
    apps:
      com.nvidia.bbciplayer: BBC iPlayer
      air.ITVMobilePlayer: ITV Hub
    state_detection_rules:
      'com.nvidia.bbciplayer':
        - 'paused':
            'media_session_state': 2  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
        - 'playing':
            'media_session_state': 3  # this indentation is important!
            'wake_lock_size': 3  # this indentation is important!
        - 'standby':
            'media_session_state': 2  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
      'com.netflix.ninja':
        - 'paused':
            'media_session_state': 2  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
        - 'playing':
            'media_session_state': 3  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
        - 'standby':
            'media_session_state': 2  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
      'tunein.player':
        - 'paused':
            'media_session_state': 1  # this indentation is important!
            'wake_lock_size': 2       # this indentation is important!
        - 'playing':
            'media_session_state': 3  # this indentation is important!
            'wake_lock_size': 4       # this indentation is important!
        - 'standby':
            'media_session_state': 1  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
      'org.xbmc.kodi':
        - 'paused':
            'media_session_state': 2  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
        - 'playing':
            'media_session_state': 3  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
        - 'standby':
            'media_session_state': 1  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
      'com.google.android.youtube.tv':
        - 'paused':
            'media_session_state': 2  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!
        - 'playing':
            'media_session_state': 3  # this indentation is important!
            'wake_lock_size': 4       # this indentation is important!
        - 'standby':
            'media_session_state': 2  # this indentation is important!
            'wake_lock_size': 3       # this indentation is important!

Any ideas?

Just delete all of that and restart.

Android TV moved from YAML to the UI in version 2022.02.

If it is still working it will have been imported and you should see it in Settings → Devices & Services → Integrations.

Thank you @tom_l that worked great!

@tom_l I was initially quickly able to integrate my adroid tv’s but currently all are out. I would love to delete all of them and start from scratch but i’m not able to delete them from the UI. Can you please give me some advice ?

I don’t use that integration. But all integrations configured via the ui should be able to be deleted from the ui. You might have to select one devices before the delete menu appears. e.g. for esphome:

No three dot menu for the list of all devices in the integration:

Screenshot 2023-01-07 at 02-14-42 Settings – Home Assistant

After selecting one of the devices:

Hi Tom,

Most of them are, but this one isn’t. For the google calendar integration I had the same and looked in the .storage folder but here I don’t find it.
image

1 Like

Is it there if you scroll down in that menu?

This wasn’t my best moment… Yes the delete came up after further scrolling