New Guy need Help

Hi All,
New to all Home assistant and just installed Hass io on a Raspberry Pi 3 B+, I have coding skills what so every and at the moment I am just scratching around trying to get things working by checking out the help on these forums and uTube videos, and here is the BUT! I just can’t seem to get my head round some thing.
What I am trying to do is add a Broadlink controller, I have cut and past some code into the Configuration.Yaml via " Configurator " and get the green tick but when I check my config I get the following error. The videos make it look so simple :blush: The Broadlink bit is at the bottom

Sorry if this post is a mess couldn’t seem to find the option to view before posting and wasn’t sure about the code

__________________________________________________________________________ Preformatted text`Invalid config for [cloud]: [-platform] is an invalid option for [cloud]. Check: cloud->cloud->-platform. (See /config/configuration.yaml, line 68). Please check the docs at Home Assistant Cloud - Home Assistant
Component not found: switches


indent preformatted text by 4 spaces
>         homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 52.9295
  longitude: -1.4342
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/London
  # Customization file
  customize: !include customize.yaml

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Sensors
sensor:
  # Weather prediction
  - platform: yr

# Text to speech
tts:
  - platform: google

# Cloud
cloud:

#switch:
  -platform: broadlink
  host: 192.168.x.xx
  mac: '34:xx:34:xx:ee:xx'
  type: rm3_pro_plus
  
switches:
      Shelf_light:
        friendly_name: "Shelf Light"
        command_on: 'JgC8AAABL5IWEBUQFhAVEBYQFRAWEBUQFjQVNRU1FTUVEBY0FTUVNRU0FjQWEBURFREVEBUQFREVERUQFTQWNBY0FjQVNRU1FQAFQAABL0cWAAxWAAEvRxYADFYAAS5HFgAMVgABLkcWAAxWAAEtSBUADFYAAS5IFQAMVgABLUgVAAxXAAEtRxYABA4JAAg'
        command_off: 'JgCYAAABLpIVERUQFRAWEBUQFhAVEBURFTQWNBU1FTUVEBY0FTUVNRUQFTUVEBYQFRAVERUQFRAWNBURFTQWNBY0FTUVNRU0FgAFQQABLkgVAAxFAAEtSRUADEkAAS9HFgAMPQABLkgVAAxCAAEuSBUADFgAAS1IFQAMWAABLUkUAAxYAAEsSRUADFgAAS1IFQAMWAABLUgVAA0F'

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
panel_iframe:
  configurator:
    title: Configurator
    icon: mdi:wrench
    url: http://192.168.0.33:3218

Your cloud error is because the switch is commented out with the #, it thinks that is part of the cloud component. But then you have switches which is not a component, only switch is.

#switch:
  -platform: broadlink
  host: 192.168.x.xx
  mac: '34:xx:34:xx:ee:xx'
  type: rm3_pro_plus

the above should be something like (this is just formatting I am not sure what broadlink is)

switch:
  - platform: broadlink
    host: 192.168.x.xx
    mac: '34:xx:34:xx:ee:xx'

you have a lot of spacing errors though, just keep fixing them until the errors go away.

Yaml is space oriented, and your spacing is off. You also commented out your switch section. Other things to note, you are using capitals for section labels in yaml. HA doesn’t like that, remove all uppercase for section names.

switch:
  - platform: broadlink
    host: 192.168.x.xx
    mac: '34:xx:34:xx:ee:xx'
    type: rm3_pro_plus
    switches:
      shelf_light:
        friendly_name: "Shelf Light"
        command_on: 'JgC8AAABL5IWEBUQFhAVEBYQFRAWEBUQFjQVNRU1FTUVEBY0FTUVNRU0FjQWEBURFREVEBUQFREVERUQFTQWNBY0FjQVNRU1FQAFQAABL0cWAAxWAAEvRxYADFYAAS5HFgAMVgABLkcWAAxWAAEtSBUADFYAAS5IFQAMVgABLUgVAAxXAAEtRxYABA4JAAg'
        command_off: 'JgCYAAABLpIVERUQFRAWEBUQFhAVEBURFTQWNBU1FTUVEBY0FTUVNRUQFTUVEBYQFRAVERUQFRAWNBURFTQWNBY0FTUVNRU0FgAFQQABLkgVAAxFAAEtSRUADEkAAS9HFgAMPQABLkgVAAxCAAEuSBUADFgAAS1IFQAMWAABLUkUAAxYAAEsSRUADFgAAS1IFQAMWAABLUgVAA0F'

I suggest you read up on yaml and how it works before copying and pasting code into your configuration.

Thanks Guys

Hi guys OK spent some more time on the above and have managed to get an entry to show up in the Overview but for some reason it doesn’t work there is no actual switch and what is there has a strike through it

[Broadlink switch](Image and video hosting by TinyPic)

   - platform: broadlink
host: 192.168.0.2
mac: '32:ea:32:42:ee:ab'
type: rm2_pro_plus
switches:
  shelf_light:
    friendly_name: "shelf_light"
    command_on: 'JgC8AAABL5IWEBUQFhAVEBYQFRAWEBUQFjQVNRU1FTUVEBY0FTUVNRU0FjQWEBURFREVEBUQFREVERUQFTQWNBY0FjQVNRU1FQAFQAABL0cWAAxWAAEvRxYADFYAAS5HFgAMVgABLkcWAAxWAAEtSBUADFYAAS5IFQAMVgABLUgVAAxXAAEtRxYABA4JAAg=' 
    command_off: 'JgCYAAABLpIVERUQFRAWEBUQFhAVEBURFTQWNBU1FTUVEBY0FTUVNRUQFTUVEBYQFRAVERUQFRAWNBURFTQWNBY0FTUVNRU0FgAFQQABLkgVAAxFAAEtSRUADEkAAS9HFgAMPQABLkgVAAxCAAEuSBUADFgAAS1IFQAMWAABLUkUAAxYAAEsSRUADFgAAS1IFQAMWAABLUgVAA0F='

That is actually a switch… a lightning bolt for on and off… You can I believe change it so it shows a toggle…

customize_domain:
  switch:
    assumed_state: false

Also I hope your last quoted code is NOT what you have in your config but rather you have what Petro posted.

You need to look at the instructions for posting code blocks…

1 Like

Thanks will have a look around,

I have a rm3 pro would that make a difference tried changing the type but it created an error

See my edit…

The last posted code is how it appears in my Configuration.yaml it was the only entry that didn’t error and it shows a switch which is progress :grinning: finding hard to get my head round it

Thanks for your reply

Thanks to all that replied manage to get it sorted. :grinning: