Can't get customize to work

Hi!

I am following this guide:

Yet when I try this code:

customize:
- entity_id: sensor.bertil_humidity
  hidden: true
- entity_id: sensor.bertil_temperature
  hidden: true
- entity_id: sensor.kalle_temperature
  hidden: true
- entity_id: device_tracker.anderssonsimac
  hidden: true
- entity_id: device_tracker.samuelsimac
  hidden: true
- entity_id: device_tracker.samuelsklocka
  hidden: true
- entity_id: device_tracker.ginasiphone
  hidden: true

I still get this error:

ERROR:homeassistant.bootstrap:Invalid config for [homeassistant]: Expected dictionary for dictionary value @     data['customize']. Got [OrderedDict([('entity_id', 'sensor.bertil_humidity')]), OrderedDict([('entity_id',     'sensor.bertil_temperature')]), OrderedDict([('entity_id', 'sensor.kalle_temperature')]), OrderedDict([('entity_id', 'device_tracker.anderssonsimac')]), OrderedDict([('entity_id', 'device_tracker.samuelsimac')]), OrderedDict([('entity_id', 'device_tracker.samuelsklocka')]), OrderedDict([('entity_id', 'device_tracker.ginasiphone')])]. (See /home/homeassistant/.homeassistant/configuration.yaml, line 2). 
INFO:homeassistant.core:Bus:Handling <Event call_service[L]: service_data=message=The following components and platforms could not be set up:
* [homeassistant](https://home-assistant.io/components/homeassistant/)
Please check your config, title=Invalid config, notification_id=invalid_config, domain=persistent_notification, service=create, service_call_id=1976359664-1>

Any ideas?

Try to add a space in front of each line from line from line number 2.

customize:
 - entity_id: sensor.bertil_humidity
   hidden: true
 - entity_id: sensor.bertil_temperature
   hidden: true
 - entity_id: sensor.kalle_temperature
   hidden: true

You’re missing the double space at the start of the lines, as shown on the page you linked to :wink:

customize:
  - entity_id: sensor.bertil_humidity
    hidden: true
  - entity_id: sensor.bertil_temperature
    hidden: true
  - entity_id: sensor.kalle_temperature
    hidden: true
  - entity_id: device_tracker.anderssonsimac
    hidden: true
  - entity_id: device_tracker.samuelsimac
    hidden: true
  - entity_id: device_tracker.samuelsklocka
    hidden: true
  - entity_id: device_tracker.ginasiphone
    hidden: true

Hi!

Thanks for your answers. There are two spaces already in the configuration file, when I copy-pasted to discourse the spaces were removed. Any other ideas?

I’m having the same exact problem, even with correct spacing. It seems that it does not expect a list but a normal dictionary:

Expected dictionary for dictionary value @ data['customize']. Got [OrderedDict...

If a remove the list and only have one entry (without the dash then), it cannot find the entity id, although I try with standard sun.sun or other entity ids found on the <> tab.

I am back to using the old way although that is a bit more cumbersome as you can’t comma-separate entity-ids.

The new format works for me, on 0.37, I’m using:

homeassistant:
...
  customize: !include customize.yaml

Then in customize.yaml

- entity_id: sensor.dark_sky_summary
  friendly_name: Summary
- entity_id: sensor.utility_door
  icon: mdi:glassdoor
  friendly_name: Utility room door
  sensor_class: opening

Seeing your configuration file should help us help you. Oh, and details of what version number of HA you’re running.

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: REMOVED
  longitude: REMOVED
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 135
  # 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/Stockholm
  customize:
    - entity_id: sensor.bertil_humidity
      hidden: true
    - entity_id: sensor.bertil_temperature
      hidden: true
    - entity_id: sensor.kalle_temperature
      hidden: true

    - entity_id: device_tracker.anderssonsimac
      hidden: true
    - entity_id: device_tracker.samuelsimac
      hidden: true
    - entity_id: device_tracker.samuelsklocka
      hidden: true
    - entity_id: device_tracker.ginasiphone
      hidden: true

    #FRIENDLY NAMES

    - entity_id: switch.fonster
      icon: mdi:lamp
    - entity_id: switch.nattduksbordslampa
      icon: mdi:lightbulb
    - entity_id: switch.new_york
      icon: mdi:city
    - entity_id: switch.skrivbordslampa
      icon: mdi:spotlight-beam
    - entity_id: switch.spottar
      icon: mdi:spotlight-beam
    - entity_id: switch.strip_flygplan
      icon: mdi:led-on
    - entity_id: switch.strip_sang
      icon: mdi:led-on
    - entity_id: switch.strip_tak
      icon: mdi:led-on
    - entity_id: switch.strip_skrivbord
      icon: mdi:led-on


# Enables the frontend
frontend:

http:
  # Uncomment this to add a password (recommended!)
  api_password: REMOVED
  # Uncomment this if you are using SSL or running in Docker etc
  # base_url: example.duckdns.org:8123

# Checks for available updates
updater:

# 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:

# Track the sun
sun:

# Text to speech
tts:
  platform: google

# Telldus Live Service
tellduslive:
  public_key: REMOVED
  private_key: REMOVED
  token: REMOVED
  token_secret: REMOVED

#iCloud presence check
device_tracker:
  - platform: icloud
    username: REMOVED
    password: REMOVED
    account_name: REMOVED



# Groups

##VIEWS
group:
  outlets:
    name: Uttag
    view: yes
    entities:
      - group.Grupper
      - group.Individuellt
  udev1:
    name: Enheter
    view: yes
    entities:
      - group.Enheter
  weather:
    name: Väder
    view: yes
    entities:
      - group.weather1
##GROUPS
  Grupper: switch.allt, switch.allt_forutom_strips, switch.ledstrips
  Individuellt: switch.fonster, switch.nattduksbordslampa, switch.new_york, switch.skrivbordslampa, switch.spottar, switch.strip_flygplan, switch.strip_sang, switch.strip_skrivbord, switch.strip_tak
  Enheter: device_tracker.ginasiphone, device_tracker.samuelsiphone, device_tracker.mikaelsiphone, device_tracker.samuelsipad, device_tracker.stellasiphone
  Väder: sun.sun

Here you go @Tinkerer

@Samuel What version number of HA?

How do I find out? @Tinkerer

EDIT: Just found it, 0.36.1

On the HA dashboard, pop open the menu on the left and then select the i in the circle.

I wonder if the new way is only valid from 0.37. Certainly when I started, a couple of weeks ago on 0.35, I don’t remember seeing the new way as an option.

Try updating your install.

Will try that.

The thing is, I installed HA yesterday. Is there any difference in that short of a time period?

Well, read the blog article :wink: There are documented breaking changes, and I suspect the non-breaking change that resulted in the new format is the NEW CUSTOMIZATION OPTIONS piece in there.

If you stick with the old format, you’ll be fine, and it’s unfortunate that the changes came in without a note in the documentation when the new format was introduced.

1 Like

Hehe, thanks for your reply. It actually seems to be installing my modules now and I did not get any error. Will get back to you once up and running. Thanks for your help!

Yay! Everything works, even with the new update. Thanks for your help!

Not a problem. I did have a quick look at the history of the Customize page, and it does show that the new format was introduced with 0.37. It’s unfortunate (ok, annoying) that that information was included in the edit.