Failed to restart Home Assistant

The system cannot restart because the configuration is not valid: Invalid config for [mqtt]: [name:] is an invalid option for [mqtt]. Check: mqtt->mqtt->switch->2->name:. (See /config/configuration.yaml, line 17).

Loads default set of integrations. Do not remove.

default_config:

Load frontend themes from the themes folder

frontend:
themes: !include_dir_merge_named themes

Text to speech

tts:

  • platform: google_translate

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

mqtt:
broker: 192.168.100.172
port: 1883
username: XXXX
password: XXX

Example configuration.yaml entry

switch:

  • name: ‘output-1’
    unique_id: output-1
    state_topic: ‘server/c5a1fc1837679772e927e9de/state’
    command_topic: ‘server/c5a1fc1837679772e927e9de/set’
    payload_on: ‘{“relay1”:{“on”:1}}’
    payload_off: ‘{“relay1”:{“on”:0}}’
    value_template: ‘{{ value_json.relay1.on }}’
    state_on: 1
    state_off: 0

  • name: ‘output-2’
    unique_id: output-2
    state_topic: ‘server/c5a1fc1837679772e927e9de/state’
    command_topic: ‘server/c5a1fc1837679772e927e9de/set’
    payload_on: ‘{“relay2”:{“on”:1}}’
    payload_off: ‘{“relay2”:{“on”:0}}’
    value_template: ‘{{ value_json.relay2.on }}’
    state_on: 1
    state_off: 0

That style of mqtt configuration was deprecated 6 months ago, and removed in 2022.12.

Read the mqtt docs and fix your config.