core: Person cannot be merged (Packages)

Home Assistant release with the issue:

0.88.0

Last working Home Assistant release (if known): new component

Operating environment (Hass.io/Docker/Windows/etc.):

homeassistant in docker on unRAID system

Component/platform:

https://www.home-assistant.io/components/person

Description of problem: the person component cannot be configured in a package. if the same code is present in the configuration.yaml it all works.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

person:
  - name: Roland
    id: person_roland
    device_trackers:
      - device_tracker.nmap_rolands_nokia

this works!

But:

  packages:
    !include_dir_named packages

with this as an include file does not work. (filename person.yaml)

person:
  - name: Roland
    id: person_roland
    device_trackers:
      - device_tracker.nmap_rolands_nokia

Traceback (if applicable):

2019-02-22 21:14:33 ERROR (MainThread) [homeassistant.config] Package person setup failed. Component person cannot be merged. Expected a dict. (See /config/packages/person.yaml:4). 

Additional information: https://community.home-assistant.io/t/component-person-cannot-be-merged/100963

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 16 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Lol, so true. Will look into it tomorrow. Laptop ran out of stormlight.

It’s most likely the validation schema for person

This is not how the package key works: https://www.home-assistant.io/docs/configuration/packages/. File names become the package’s key, not the platform’s. Each package may contain a person key. The content of person would then be merged into a single person by home-assistant before being consumed.

I am too facing the same issue (person cannot be merged). The following config doesn’t work for person, but does for everything else (light, cast, … you name it). I am not using person.yaml as a file name to help visualize things.

configuration.yaml

homeassistant:
  packages: !include_dir_named packages/

packages/somebody.yaml

homeassistant:
  customize:
    person.somebody:
      entity_picture: !secret somebody_picture_url

person:
  - id: "somebody"
    name: "Somebody"
    device_trackers:
      - device_tracker.somebody_phone

packages/someone.yaml

person:
  - id: "someone"
    name: "Someone"
    device_trackers:
      - device_tracker.someone_phone

Just came back here to confirm it is all working now. Thanks a lot!

perosn.yaml should only contain

  - name: Roland
    id: person_roland
    device_trackers:
      - device_tracker.nmap_rolands_nokia

It should not have a person: in it, as your include_dir_named of person.yaml already creates the person: key