"Check Configuration" never completing after updating mqtt to new format (Haven't found solution since 22.06); Please help as I would like to update my HA instance

Hello all,

I’m hoping you can help me deep dive into fixing this issue. I really don’t want to have to start over with my home assistant instance.

This issue has existed ever since version 22.06 on my machine. I can get every component in the list within developer tools to reload successfully. When I comment out my old yaml mqtt code (below) that (validates in the configurator) and then uncomment the new version after clicking the “Check configuration” button on this screen, the blue thing just spins forever and never completes. If I put the code back to the old mqtt format. The configuration check completes successfully.

I’ll be honest, this is the 3rd time I have posted this issue here in hopes that someone new will come along and spot the issue or possibly direct me to someone in development that can look into this further.

Thank you all for all of the help you have given me in the past and I’m hoping someone can help me solve this.

I have my mqtt config stored in a package and called into my main config. Below is a copy paste of the file, the area called “NEW” is what causes the check config to never complete, if I comment that area out and uncomment the area called “OLD”, the check config completes.

Hopefully you all can help direct this to the proper channel if no one can figure this out.

Thank you all again, I am at a complete loss on this one.

input_boolean:
  washer_finished:
    name: Washer Finished
    icon: mdi:washing-machine
input_number:
  stepper_control_right_test_blind:
    name: Stepper Control Right Test Blind
    min: -200
    max: 460
    step: 1
    mode: slider
  stepper_control_left_test_blind:
    name: Stepper Control Left Test Blind
    min: -200
    max: 700
    step: 1
    mode: slider

#####NEW######

mqtt:
  sensor:
    - name: "Washer Status"
      state_topic: "house/washer/status"
    - name: "Washer Last Complete"
      state_topic: "house/washer/time_complete"
      device_class: timestamp
    - name: "Washer Last Emptied"
      state_topic: "house/washer/time_emptied"
      device_class: timestamp

#####/NEW######

#####/OLD######

sensor:
  # - platform: "mqtt"
  #   name: "Washer Status"
  #   state_topic: "house/washer/status"
  # - platform: "mqtt"
  #   name: "Washer Last Complete"
  #   state_topic: "house/washer/time_complete"
  #   device_class: timestamp
  # - platform: "mqtt"
  #   name: "Washer Last Emptied"
  #   state_topic: "house/washer/time_emptied"
  #   device_class: timestamp

# One entry for each beacon you want to track
  - platform: mqtt_room
    device_id: "apple:1006:10-8"
    name: 'Westons iPhone Room Presence'
    state_topic: 'espresense/devices/apple:1006:10-8'
    timeout: 10
    away_timeout: 120

    #####/OLD######

    ####NOT USING CURRENTLY####

        # # MQTT Sensor for DishWasher Status.
  # - platform: mqtt
  #   name: "DishWasher Status"
  #   state_topic: "house/dishwasher/status"
  # MQTT Sensor for Washing Machine Status.

  # - platform: mqtt_room
  #   device_id: 123testid
  #   state_topic: "espresense/rooms"

    ####/NOT USING CURRENTLY####

utility_meter:
  washer_daily_kwh:
    source: sensor.washer_switch_electric_consumed_kwh
    cycle: daily
  washer_weekly_kwh:
    source: sensor.washer_switch_electric_consumed_kwh
    cycle: weekly

automation:
  - id: washer_running
    alias: Washer Running
    trigger:
      - above: 4
        entity_id: sensor.washer_power_consumed_w
        platform: numeric_state
    condition:
      condition: or
      conditions:
        - condition: state
          entity_id: sensor.washer_status
          state: idle
        - condition: state
          entity_id: sensor.washer_status
          state: complete
    action:
      - service: mqtt.publish
        data:
          topic: house/washer/status
          payload: running
          retain: true
    initial_state: true

  - id: washer_complete
    alias: Washer Complete
    trigger:
      - below: 2
        entity_id: sensor.washer_power_consumed_w
        platform: numeric_state
    condition:
      - condition: state
        entity_id: sensor.washer_status
        state: running
    action:
      - service: mqtt.publish
        data:
          topic: house/washer/status
          payload: complete
          retain: true
      - service: mqtt.publish
        data:
          topic: house/washer/time_complete
          payload: "{{ utcnow().isoformat() }}"
          # payload: '{{ now().timestamp() }}'
          retain: true
    initial_state: true

  - id: washer_notification
    initial_state: true
    alias: Washer Notification
    trigger:
      - platform: state
        entity_id: sensor.washer_status
        from: running
        to: complete
    action:
      - service: script.speech_engine
        data:
          # who: 'kitchen'
          message: "Just a quick heads up, It appears the washing machine has completed its cycle"
      - service: script.text_notify
        data:
          who: parents
          title: Washing Machine Finished
          message: "Just a quick heads up, It appears the washing machine has completed its cycle"
          data:
          group: "appliances"
          tag:
      - service: script.turn_on
        entity_id: script.washer_finished_notification_audible
      - service: input_boolean.turn_on
        data: {}
        target:
          entity_id: input_boolean.washer_finished

  - id: washer_emptied
    initial_state: true
    alias: Washer Emptied
    trigger:
      - platform: state
        entity_id: binary_sensor.washer_door
        from: "off"
        to: "on"
    action:
      - service: mqtt.publish
        data:
          topic: house/washer/status
          payload: idle
          retain: true
      - service: script.turn_off
        entity_id: script.washer_finished_notification_audible
      - service: mqtt.publish
        data:
          topic: house/washer/time_emptied
          # payload: '{{ now().timestamp() }}'
          payload: "{{ utcnow().isoformat() }}"
          retain: true
      - service: input_boolean.turn_off
        data: {}
        target:
          entity_id: input_boolean.washer_finished

script:
  washer_finished_notification_audible:
    sequence:
      - repeat:
          while:
            - condition: state
              entity_id: sensor.washer_status
              state: "complete"
          sequence:
            - delay:
                minutes: 30
            - service: script.simplified_washer_audible

  simplified_washer_audible:
    sequence:
      - condition: state
        entity_id: group.family
        state: "home"
      - condition: state
        entity_id: sensor.washer_status
        state: complete
      - service: script.speech_engine
        data:
          # who: 'kitchen'
          message: >
            {{ [
              'Pardon me, ',
              'Excuse me, ',
              'I do not mean to interrupt, but,',
              'I hate to interrupt, but,',
              'I beg your pardon, ',
              'I do not mean to intrude, but, ',
              'I am sorry to interrupt, but. ',
              'Just a quick heads up, '
              ] | random }}
            <p>
              The washing machine completed its cycle 
              {% set seconds = now().timestamp() - as_timestamp(states.sensor.washer_status.last_changed) %}
              {% if (seconds / ( 60 * 60 )) | int == 1 %}
                over an hour ago.
                {{ [
                'Do not forget to rotate the clothes.', 
                'Was someone going to rotate the laundry?',
                'Once you rotate the laundry I will stop reminding you to do it. So if you want me to stop. Its up to you.'
                ] | random }}
              {% elif (seconds / ( 60 * 60 )) | int > 1 and (seconds / ( 60 * 60 )) | int < 6 %}
                over {{ (seconds //  ( 60 * 60 )) | int }} hours ago.
                {{ [
                'Much longer and you are going to need to wash them again.', 
                'Someone needs to rotate the laundry.',
                'Do not forget about the clothes in the washing machine.',
                'Surely you did not mean to forget about the clothes. Mistakes happen. But you can still fix it.',
                'Do you like your clothes smelling like mildew? Becasue that is what is happening right now.'
                ] | random }}
              {% elif (seconds / ( 60 * 60 )) | int > 6 %}
                over {{ (seconds //  ( 60 * 60 )) | int }} hours ago.
                {{ [
                'That is a crazy amount of time.', 
                'Did you decide you want those clothes to suffer?',
                'You might as well just rewash those clothes.',
                'I can smell the mildew. Virtually that is.',
                'Surely you did not mean to forget about the clothes.'
                ] | random }}
              {% else %}
                {{ (seconds // 60) | int }} minutes ago.
                {{ [
                'Do not forget to rotate the clothes.', 
                'Someone forgot to move the clothes to the dryer. I am not going to name names, but there is a camera in there. Do I need to publically shame someone?',
                'You might want to move them to the dryer.'
                ] | random }}
              {% endif %}
            </p>

  washer_idle:
    sequence:
      - service: mqtt.publish
        data:
          topic: house/washer/status
          payload: idle
          retain: true
  washer_running:
    sequence:
      - service: mqtt.publish
        data:
          topic: house/washer/status
          payload: running
          retain: true
  washer_complete:
    sequence:
      - service: mqtt.publish
        data:
          topic: house/washer/status
          payload: complete
          retain: true
      - service: mqtt.publish
        data:
          topic: house/washer/time_complete
          # payload: '{{ now().timestamp() }}'
          payload: "{{ utcnow().isoformat() }}"
          retain: true
########################
#################REMNANTS- AUTOMATIONS
########################
# - id: e1cb26fe-0423-11eb-adc1-0242ac120002
#   initial_state: true
#   alias: Dryer Notification
#   trigger:
#   - platform: state
#     entity_id: binary_sensor.dryer_dry_completed
#     from: 'off'
#     to: 'on'
#   action:
#   - service: script.status_annc
#     data:
#       who: '{{ states.sensor.room_presence.state }}'
#       call_interruption: 1
#       speech_message: It appears the dryer has finished.
#   - delay:
#       minutes: 15
#   # - service: script.turn_on
#   #   entity_id: script.dryer_finished_notification_audible

# - id: dishwasher_idle
#   initial_state: true
#   alias: Dishwasher Idle
#   trigger:
#   - platform: state
#     entity_id: device_tracker.dishwasher
#     to: 'not_home'
#   action:
#   - service: script.dishwasher_idle

# # When dishwasher connects to network assume it is running cycle.
# - id: dishwasher_running
#   initial_state: true
#   alias: Dishwasher Running
#   trigger:
#   - platform: state
#     entity_id: device_tracker.dishwasher
#     to: 'home'
#   action:
#   - service: script.dishwasher_running

########################
#################REMNANTS- SCRIPTS
########################

# dryer_finished_notification_audible:
#   sequence:
#   - repeat:
#       while:
#         - condition: state
#           entity_id: sensor.washer_status
#           state: 'complete'
#       sequence:
#       - service: script.dryer_audible
#       - delay:
#           minutes: 45

# dishwasher_idle:
#   sequence:
#   - service: mqtt.publish
#     data:
#       topic: house/dishwasher/status
#       payload: idle
#       retain: true
#
# dishwasher_running:
#   sequence:
#   - service: mqtt.publish
#     data:
#       topic: house/dishwasher/status
#       payload: running
#       retain: true

UPDATE:

I commented the “OLD” section out. Moved the “NEW” section straight to the config file and it still will not validate the config.

UPDATE 2:

With 1 sensor in the “#####NEW####” area it also never completes but if I comment the area out between the “#####NEW######”, it completes successfully.

The error in the log:

Logger: homeassistant.core
Source: config.py:688
First occurred: 1:45:15 PM (3 occurrences)
Last logged: 2:15:41 PM

Error executing service: <ServiceCall homeassistant.restart (c:01GKSGW83R8H1SP9QAB53CHN1J)>
Error executing service: <ServiceCall homeassistant.restart (c:01GKSJKNRRQJQKH8EK6RMYMD5T)>
Error executing service: <ServiceCall homeassistant.restart (c:01GKSJKZTPKP9RJNDAZXH8SKRT)>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1762, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1781, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 693, in async_handle_core_service
    errors = await conf_util.async_check_ha_config_file(hass)
  File "/usr/src/homeassistant/homeassistant/config.py", line 916, in async_check_ha_config_file
    res = await check_config.async_check_ha_config_file(hass)
  File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 119, in async_check_ha_config_file
    await merge_packages_config(
  File "/usr/src/homeassistant/homeassistant/config.py", line 766, in merge_packages_config
    error = _recursive_merge(conf=config[comp_name], package=comp_conf)
  File "/usr/src/homeassistant/homeassistant/config.py", line 680, in _recursive_merge
    error = _recursive_merge(conf=conf[key], package=pack_conf)
  File "/usr/src/homeassistant/homeassistant/config.py", line 688, in _recursive_merge
    if conf.get(key) is not None:
AttributeError: 'NodeListClass' object has no attribute 'get'

So for anyone finding this in the future, I ended up having the statement:

mqtt:
  sensor:

in my configuration twice (in different package files). The configurator would never finish because of it but also would not “end” giving me a clue to where the problem was. Once this was resolved and all mqtt sensors were moved under 1 heading in an individual file, the issue went away.