As Newby, loved auto-detected Devices; but the Config file syntax errors -Whoa!

Hi
Barns the Newby here… Ive just repurposed on old RasPi3+ (with camera still attached — any ideas? :slight_smile: ) so I can integrate all of the various random bits of BT and ‘smart’ tech — often using different apps — around the house. HA looks terrific. BUT It’s maybe 30 yrs since I played with this command line stuff.

So I loved the auto-discovery stuff, but it wasn’t enough! And I was wary adding some lines to the config…yaml file. I copied and pasted the 2 line definition line below straight from a RaspberryPi HA site. The instruction was to integrate the watering system… by hand. What could go wrong?

So Ive not succeeded in adding even the first line of half a dozen needed. Not that any of these lines make sense either, yet!
(Now to change to CODE…?)

# Example configuration.yaml entry
hydrawise:
  - access_token: XYZ_123_etc
#and to give context, here is the rest…
switch:
  - platform: hydrawise
sensor:
  - platform: hydrawise
binary_sensor:
  - platform: hydrawise

Ok, t‘Code works… ,
Anyways, suddenly the (compile?) error pops up with an explanation that leaves me with not the faintest understanding if what I am doing wrong.

Invalid config for [hydrawise]: expected a dictionary for dictionary value @ data[‘hydrawise’].
Got [{‘access_token’: ‘XYZ_123_etc’}]. (See /config/configuration.yaml, line 9).
And line 9 in the editor is ‘hydrawise:’ and line 10 (the real line 9?) starts ‘ - access_token:’

Please explain what is going on, and what I can learn from that error message? Ive just learned about the new syntax… please don’t tell me this is a syntax issue from legacy vs new syntax? How was I to know? Did the new syntax improve the error reporting? As a novice, that is all I want…

There might be an issue with the integration.