Skip to content

Syntax error? #4

Description

@maffee

Hi,

I'm trying to use this with Samsung M3's & M7. Any idea whether they should work? I created the folder structure, gave it chmod 777, copied the .py file and added this to configuration.yaml:

media_player:
  - platform: samsung_multi_room
    name: "Test"
    host: 192.168.1.101
    max_volume: 20 # on this level glass breaks

With this config Hass.io wont even start due to this error:

WARNING:homeassistant.helpers.config_validation:Your configuration contains extra keys that the platform does not support.
Please remove [name].
ERROR:homeassistant.scripts.check_config:BURB
Traceback (most recent call last):
 File "/usr/local/lib/python3.7/site-packages/homeassistant/scripts/check_config.py", line 207, in check
   res['components'] = check_ha_config_file(hass)
 File "/usr/local/lib/python3.7/site-packages/homeassistant/scripts/check_config.py", line 374, in check_ha_config_file
   platform = loader.get_platform(hass, domain, p_name)
 File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 89, in get_platform
   domain=platform_name, platform=domain))
 File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 147, in _load_file
   module = importlib.import_module(path)
 File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
   return _bootstrap._gcd_import(name[level:], package, level)
 File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
 File "<frozen importlib._bootstrap>", line 983, in _find_and_load
 File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
 File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
 File "<frozen importlib._bootstrap_external>", line 724, in exec_module
 File "<frozen importlib._bootstrap_external>", line 860, in get_code
 File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
 File "/config/custom_components/media_player/samsung_multi_room.py", line 7
   <!DOCTYPE html>
   ^
SyntaxError: invalid syntax
Fatal error while loading config: invalid syntax (samsung_multi_room.py, line 7)
Failed config
 General Errors:
   - invalid syntax (samsung_multi_room.py, line 7)

If I comment out 'name', HA starts but I get syntax error.

If I leave the name blank (just name:), it gives the longer error described above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions