Errors in configuration.yaml - incorrect indentation or something else?

I amended my configuration.yaml to include my shelly garage door openers. It seems to work fine. However, this is caused now error messages after a HASS restart:


Logger: homeassistant.setup
Source: setup.py:273
First occurred: 5:13:28 PM (4 occurrences)
Last logged: 5:13:28 PM

Setup failed for 'entities': Integration not found.
Setup failed for 'title': Integration not found.
Setup failed for 'customize': Integration not found.
Setup failed for 'type': Integration not found.

Here is my configuration.yaml

# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes


# ---------------------------------------------------------------------------------------
#homeassistant:
customize: 
  cover.garage.door:
    device_class: garage
#  !include customize.yaml

# Garage door
cover:
  - platform: template
    covers:
      garage_1:
        device_class: garage
        friendly_name: "Garage Door 1"
        value_template: "{{ is_state('binary_sensor.garage_door_sensor_input', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.shellyplus1_01_garagedoor_switch_0
        close_cover:
          service: switch.turn_on
          entity_id: switch.shellyplus1_01_garagedoor_switch_0
        icon_template: >-
          {% if is_state('cover.garage_1', 'open') %}
            mdi:garage-open
          {% else %}
            mdi:garage
          {% endif %}

      garage_2:
        device_class: garage
        friendly_name: "Garage Door 2"
        value_template: "{{ is_state('binary_sensor.shellyplus1_test_input_0_input', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.shellyplus1_test_switch_0
        close_cover:
          service: switch.turn_on
          entity_id: switch.shellyplus1_test_switch_0
        icon_template: >-
          {% if is_state('cover.garage_2', 'open') %}
            mdi:garage-open-variant
          {% else %}
            mdi:garage-variant
          {% endif %}


type: entities
title: Garage Doors
entities:
  - entity: cover.garage_1
    icon_template: |-
      {% if is_state('cover.garage_1', 'open') %}
        mdi:garage-open
      {% else %}
        mdi:garage
      {% endif %}

  - entity: cover.garage_2
    icon_template: |-
      {% if is_state('cover.garage_2', 'open') %}
        mdi:garage-open-variant
      {% else %}
        mdi:garage-variant
      {% endif %}
# ---------------------------------------------------------------------------------------
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


I am suspecting some indentation errors, but I have not been able to figure out, exactly what is wrong, despite a lot of trial and error and google searches.

Any pointers would be greatly appreciated!
TIA!

It’s this bit:

You have two options,

  1. Delete it and restart, then put that in a card using the Dashboard UI https://www.home-assistant.io/dashboards/cards/#adding-cards-to-your-dashboard

Or

  1. Configure it correctly in YAML and restart: https://www.home-assistant.io/dashboards/dashboards/#using-yaml-for-the-overview-dashboard

Note that entities cards do not support templates. You already have the changing icon sorted in the cover: config anyway.

One final thing. In your cover definition you very likely only need to pulse the switch
unless the shellyplus is configured for auto-off.

e.g. do this for both covers:

        open_cover:
          - service: switch.turn_on
            entity_id: switch.shellyplus1_01_garagedoor_switch_0
          - delay: 0.5
          - service: switch.turn_off
            entity_id: switch.shellyplus1_01_garagedoor_switch_0
        close_cover:
          - service: switch.turn_on
            entity_id: switch.shellyplus1_01_garagedoor_switch_0
          - delay: 0.5
          - service: switch.turn_off
            entity_id: switch.shellyplus1_01_garagedoor_switch_0

Thanks much for your prompt reply, @tom_l .

Unfortunately, your explanation already went over my head :frowning:
You said, it the issue with with this section:

type: entities
title: Garage Doors
entities:
  - entity: cover.garage_1
    icon_template: |-
      {% if is_state('cover.garage_1', 'open') %}
        mdi:garage-open
      {% else %}
        mdi:garage
      {% endif %}

  - entity: cover.garage_2
    icon_template: |-
      {% if is_state('cover.garage_2', 'open') %}
        mdi:garage-open-variant
      {% else %}
        mdi:garage-variant
      {% endif %}

I compared it with my original code, but it seems to be the same. How would I have to configure it correctly (option2)?

Regarding pulsing the switch, if I understand your suggestion correctly, I already have a working solution in the shellys themselves: ‘auto off after 1 sec’

TIA!

That’s because all I did was quote what you had written to show you what to remove or change.

Read the link I posted for that option. It has examples to show you how to configure dashboards in YAML. If this is too difficult, use option 1. It is a lot easier.

Cool. You don’t need the switch turn off service in your covers then.

Thanks much, @tom_l ; removing the code and re-configuring it via option1 worked.

Now, a HASS restart still produces an error for the ‘customize’ part.

2024-04-28 18:34:43.661 WARNING (MainThread) [homeassistant.helpers.translation] Failed to load integration for translation: Integration 'customize' not found.
2024-04-28 18:34:47.971 ERROR (MainThread) [homeassistant.setup] Setup failed for 'customize': Integration not found

I have tried several variations, based on my search results, but thus far no luck.

I had it originally in the configuration.yaml as

customize: !include customize.yaml

and then in the customize.yaml

customize:
  cover.garage.door:
    device_class: garage

Then i tried in include directly in the configuration.yaml in different ways, e.g.


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes


# ---------------------------------------------------------------------------------------
#homeassistant:
customize: 
  cover.garage.door:
    device_class: garage  

# Garage door
cover:
  - platform: template
    covers:
      garage_1:
        device_class: garage
        friendly_name: "Garage Door 1"
        value_template: "{{ is_state('binary_sensor.garage_door_sensor_input', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.shellyplus1_01_garagedoor_switch_0
        close_cover:
          service: switch.turn_on
          entity_id: switch.shellyplus1_01_garagedoor_switch_0
        icon_template: >-
          {% if is_state('cover.garage_1', 'open') %}
            mdi:garage-open
          {% else %}
            mdi:garage
          {% endif %}

      garage_2:
        device_class: garage
        friendly_name: "Garage Door 2"
        value_template: "{{ is_state('binary_sensor.shellyplus1_test_input_0_input', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.shellyplus1_test_switch_0
        close_cover:
          service: switch.turn_on
          entity_id: switch.shellyplus1_test_switch_0
        icon_template: >-
          {% if is_state('cover.garage_2', 'open') %}
            mdi:garage-open-variant
          {% else %}
            mdi:garage-variant
          {% endif %}



# ---------------------------------------------------------------------------------------
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

A little more help, please…

You can’t just put things anywhere.

You have to put customize: under homeassistant:

homeassistant:
  customize: 
    cover.garage_door:
      device_class: garage  

All of this is covered in the documentation.

Greatly appreciate your patience, @tom_l ;

I had tried and based on your post just tried again

homeassistant:
  customize: 
    cover.garage.door:
      device_class: garage

This results in this error:

Failed to restart Home Assistant
 The system cannot restart because the configuration is not valid: Invalid config for 'homeassistant' at configuration.yaml, line 13: 'cover.garage.door' is an invalid option for 'homeassistant', check: customize->cover.garage.door 

That said, in the meantime I tried HASS with this section completely commented out. The initial result is positive, i.e. no error and the systems seem to behave fine. Hmm. Can I just leave it out??

Entities can only have one dot in it right after the domain. You probably need to change cover.garage.door to cover.garage_door. But first please check in dev-tools > States for the correct entity_id

Thanks much, @basbrus. I changed dot to underscore and removed the ‘comment outs’, restarted and got NO error message.

I wonder if the system will now behave differently compared to the commented out version from before. I’ll just have to monitor.
Boy oh boy!, I am so very much at the bottom of this rather steep learning curve…

Thanks again @tom_l and @basbrus for your help!