Samsung TV automation. Problems adding to configuration.yaml

Running homeassistant on a synology.

Discovery seems to have already picked up my TV. I can turn the TV on, mute and change the volume. I cannot seem to change the channels, or select source. I also cannot seem to power it on again, once powered off.

I noticed that there is a Samsung TV component that I can add into the config.yaml file, and that includes a ‘MAC’ address attribute that can be used to WoL. However, when I add the component and run a validation check, I get errors.

Any ideas whats going on here?

Below is the syntax I am using.

media_player:

  • platform: samsungtv
    host:192.168.8.8

Following is the error:

Testing configuration at /config
2018-01-29 18:32:49 ERROR (SyncWorker_0) [homeassistant.util.yaml] while scanning a simple key
in “/config/configuration.yaml”, line 60, column 1
could not find expected ‘:’
in “/config/configuration.yaml”, line 62, column 1
2018-01-29 18:32:49 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: while scanning a simple key
in “/config/configuration.yaml”, line 60, column 1
could not find expected ‘:’
in “/config/configuration.yaml”, line 62, column 1

Post your code with proper formating, see the blue box on the top of the page. It looks like you don’t have a space before 192…

Apologies, just re-added the code. Taking this literally from the samsung component page here: https://home-assistant.io/components/media_player.samsungtv/

media_player:
- platform: samsungtv
host: 192.168.8.8

here’s the full output from configuration validation:

Testing configuration at /config
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up introduction
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up recorder
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up http
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setup of domain introduction took 0.0 seconds.
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up history
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up api
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up system_log
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds.
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up frontend
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up sun
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up discovery
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up map
2018-01-30 14:16:26 ERROR (MainThread) [homeassistant.loader] Unable to find component host
2018-01-30 14:16:26 ERROR (MainThread) [homeassistant.setup] Setup failed for host: Component not found.
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up sensor
2018-01-30 14:16:26 INFO (MainThread) [homeassistant.setup] Setting up hue
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up group
2018-01-30 14:16:27 ERROR (MainThread) [homeassistant.config] Invalid config for [media_player.samsungtv]: required key not provided @ data['host']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/media_player.samsungtv/
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up updater
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.2 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.1 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.1 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.1 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain hue took 0.1 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.1 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.1 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up cloud
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up logbook
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up config
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up conversation
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up tts
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up media_player
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up zone
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain cloud took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up zeroconf
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up script
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up automation
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain zeroconf took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 0.0 seconds.
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setting up ios
2018-01-30 14:16:27 INFO (MainThread) [homeassistant.setup] Setup of domain ios took 0.0 seconds.
Failed config
  General Errors: 
    - Component not found: host
    - Setup failed for host: Component not found.

  media_player.samsungtv: 
    platform: samsungtv

Successful config (partial)
  media_player.samsungtv:

Thank you!

OK, so it seems upon revisiting that configuration.yaml, that I inadvertently inserted a tab inline.

Tab removed and problem solved. Apologies for the nuisance.

That’s ok, glad you solved it!

How are you editing your files? Try using an editor that is yaml friendly. I currently use notepad++ for local editing and the online IDE CodeAnywhere for remote editing.

Thanks for your help, rookie mistake! I’m duly embarrassed.

I’m using notepad++ but wasn’t clear on the syntax specifics for YAML. I’ve now read the cheat sheet, so am better informed, though I’m sure its not the last time I’ll encounter syntax issues.

Thanks for your help!

1 Like

No problem, rookie or not everybody makes mistakes!

I’m using an option on Notepad++ to reduce that kind of problem. Selecton the main menu the options: View > Show Symbol > Show White Space and TAB. With that option, spaces appear as small dots and tabs as an arrow pointing right.