Component pi_hole cannot be merged. Expected a dict

Apologize if this is not the right Category…

I have 2 Pi.Holes which I tried to setup.
Found quickly the topic where a patch is coming for that.
Changed all my configuration back to my original config for only 1 pi.hole.
Unfortunately, that did not work.
I am getting
Component pi_hole cannot be merged. Expected a dict.
error message and can’t figure out how to fix that.

Anyone any idea what I am doing wrong?

#-------------------------------------------
#  @CCOSTAN
#  Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#  PiHole ad Blocking Related Packages
#  https://www.vcloudinfo.com/2019/03/revisiting-the-pi-on-pi-day-with-home-assistant.html
#  YouTube Video - https://youtu.be/woA88DFlH5c
#-------------------------------------------
pi_hole:
  - host: !secret pi_hole_1_ip_addressport
#  - host: !secret pi_hole_2_ip_addressport
    ssl: false
    verify_ssl: false

sensor pi_hole:
  #     - ads_blocked_today
  #     - ads_percentage_today
  #     - dns_queries_today
  #     - domains_being_blocked
  #     - queries_cached
  #     - queries_forwarded
  #     - unique_clients
  #     - unique_domains

  - platform: template
    sensors:
      pi_hole:
        friendly_name: 'PiHole'
        entity_id: []
        value_template: "{{ 'Online' if is_state('device_tracker.pihole', 'home') else 'Offline' }}"
        
        
########################################################################
# Pi Hole DNS Template to add both sets of data together from both DNS's 
########################################################################
# - platform: template
#   sensors:
#   dns_queries:
#      friendly_name: "DNS Queries"
#      value_template: >-
#           {{ ( (states('sensor.pi_hole_dns_queries_today')|float) + (states('sensor.pi_hole_dns_queries_today_2')|float) )|round(0) }}
# #-----------------------------------------------------------------------------#
# - platform: template
#   sensors:
#   adverts_blocked:
#      friendly_name: "Adverts Blocked"
#      value_template: >-
#           {{ ( (states('sensor.pi_hole_ads_blocked_today')|float) + (states('sensor.pi_hole_ads_blocked_today_2')|float) )|round(0) }}
# #-----------------------------------------------------------------------------#
# - platform: template
#   sensors:
#   percent_of_adverts_blocked:
#      friendly_name: "Percent of Adverts Blocked"
#      unit_of_measurement: '%'
#      value_template: >-
#           {{ ( (states('sensor.pi_hole_ads_percentage_blocked_today')|float) + (states('sensor.pi_hole_ads_percentage_blocked_today_2')|float) )|round(2) }}
########################################################################
        
        
        

# Pi-Hole switch
switch:
  - platform: command_line
    switches:
      pihole_1_switch:
        command_on: !secret pi_hole_1_command_on
        command_off: !secret pi_hole_1_command_off
        command_state: !secret pi_hole_1_command_state
        value_template: "{{ value_json.status == 'enabled' }}"
    #   pihole_2_switch:
    #     command_on: !secret pi_hole_2_command_on
    #     command_off: !secret pi_hole_2_command_off
    #     command_state: !secret pi_hole_2_command_state
    #     value_template: "{{ value_json.status == 'enabled' }}"

#-------------------------------------------
group pi_hole:
  pi_hole:
    entities:
      - sensor.pi_hole
      - sensor.pi_hole_version
      - sensor.pi_hole_dns_unique_clients
      - sensor.pi_hole_dns_queries_today
      - sensor.pi_hole_ads_blocked_today
      - sensor.pi_hole_ads_percentage_today
      - sensor.pi_hole_ads_percentage_blocked_today
#-------------------------------------------

Unless something has changed on package merges since I last looked (which was admittedly a long time ago) you can merge

sensor:

But not

sensor something:

So, try reducing the sensor key and the group key to just sensor: and group: and restart homeassistant

Just tried that.
Changed to sensor: and group:
Same error.

Remove the hyphen before host

pi_hole:
  host: !secret pi_hole_1_ip_addressport
  ssl: false
  verify_ssl: false

?

LOL - you beat me to it.
I just figured it out.
Thank you anyway.

1 Like