Esphome, device_tracker and default_config could not be set up error

Good Day,

I have a problem that keeps on popping up, it is frustrating and I do not know how to solve it, sometimes restarting the PC or restoring an earlier backup works, sometimes it does not, how can I get rid of this permanently? In my recollection these issues started after 2023.11.0.

image

This generally happens when something is added to your config incorrectly (bad indents, wrong clause, etc.)

When this happens the system can’t read things that come after correctly and you see them pop as invalid config.

To help we’ll need any errors on your log and likely your configuration.yaml (posted inside preformatted text blocks - the </> icon in the post editor.

Thanks @NathanCu , I have restored a backup and the errors disappeared, I will post the logs next time, why is it intermittent if there is something wrong in the yaml?

Disk issue causing corruption that is cleared with overwrite? (thats the only one I can come up with but it’s a guess really need the logs to tell)

Unsure honestly but that’s what those errors usually mean. Something was jacked up on configuration.yaml and if you didn’t edit it…

Hi @NathanCu, here are the logs:

The service homeassistant.turn_on does not support entities input_boolean.loadshedunknown
12:05:05 PM – (WARNING) Home Assistant Core Integration - message first occurred at 10:26:52 AM and shows up 8841 times
Error evaluating condition in 'geyserautomationson': In 'condition': In 'and' (item 2 of 2): In 'state': In 'state' condition: unknown entity automation.geyser_up_on1
12:05:05 PM – (WARNING) Automation - message first occurred at 10:26:52 AM and shows up 7254 times
Template variable warning: 'None' has no attribute 'state' when rendering '{{ states.sensor.power_total_wemos.state }},{{ states.sensor.derivedgeyseruppower.state }},{{ states.sensor.derivedgeyserdownpower.state }},{{ states.sensor.wemosem3_consumo_actual.state }},{{ states.sensor.charger_adjust.state}},{{ states.sensor.backup_adjust.state }},{{states.sensor.batta_monthly.state}},{{states.sensor.battb_monthly.state}},{{states.sensor.battall_monthly.state}},{{states.counter.battery_cycle.state}},{{states.counter.battery_cycle_b.state}},{{states.sensor.allbatteries.state}},{{states.counter.lawnsincenov22.state}},{{states.sensor.non_geyser_kwh_meter_monthly.state}},{{states.sensor.geysers_total_monthly_limit.state}},{{states.sensor.filtered_battery_voltage.state}},{{states.sensor.filtered_battery_level.state}},{{states.sensor.filtered_battery_level2.state}},{{states.sensor.monthly_energywemos.state}}'
12:05:00 PM – (WARNING) helpers/template.py - message first occurred at 10:27:00 AM and shows up 101 times
Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.
12:02:55 PM – (ERROR) Internet Printing Protocol (IPP) - message first occurred at 10:57:53 AM and shows up 6 times
Watchdog heartbeat timeout: TimeoutError()
11:40:57 AM – (WARNING) runner.py
Error while getting Updates: urllib3 HTTPError ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
11:15:22 AM – (ERROR) /usr/local/lib/python3.11/site-packages/telegram/ext/updater.py - message first occurred at 10:38:19 AM and shows up 4 times
Error doing job: Task exception was never retrieved
10:59:59 AM – (ERROR) setup.py - message first occurred at 10:26:53 AM and shows up 2 times
Unable to set up dependencies of device_tracker. Setup failed for dependencies: zone
10:59:59 AM – (ERROR) setup.py - message first occurred at 10:26:11 AM and shows up 4 times
YAML file /config/logbooks.yaml contains duplicate key "exclude". Check lines 0 and 69
10:41:52 AM – (WARNING) util/yaml/loader.py - message first occurred at 10:26:11 AM and shows up 2 times
Entity sensor.geysers_total_daily_limit from integration utility_meter has state class total_increasing, but its state is not strictly increasing. Triggered by state 2.97 (2.98) with last_updated set to 2023-11-16T08:26:15.795888+00:00. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+utility_meter%22
10:30:10 AM – (WARNING) Sensor - message first occurred at 10:30:10 AM and shows up 2 times
async_update_selects failed
10:27:01 AM – (ERROR) yTubeMediaPlayer (custom integration)
The unit of sensor.geyser_3d_avg (W) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
10:26:54 AM – (WARNING) Sensor - message first occurred at 10:26:54 AM and shows up 3 times
restarted: Error executing script. Service not found for call_service at pos 5: Unable to find service counter.increment
10:26:54 AM – (ERROR) Automation
Referenced entities media_player.study_speaker are missing or not currently available
10:26:54 AM – (WARNING) helpers/service.py
TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '{{ states.sensor.sunsynk_battery_power.state | int *2 }}' but no default was specified') while processing template 'Template<template=({{ states.sensor.sunsynk_battery_power.state | int *2 }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.ss_battpower'
10:26:52 AM – (ERROR) Template - message first occurred at 10:26:52 AM and shows up 44 times
Error while processing template: Template<template=({{ states.sensor.sunsynk_pv.state | int *2 }}) renders=2>
10:26:52 AM – (ERROR) helpers/template.py - message first occurred at 10:26:52 AM and shows up 42 times
Error doing job: Exception in callback _async_at_core_state.<locals>._matched_event(<Event homeassistant_start[L]>) at /usr/src/homeassistant/homeassistant/helpers/start.py:37
10:26:52 AM – (ERROR) components/sensor/__init__.py - message first occurred at 10:26:52 AM and shows up 2 times
sensor.sunsynk_stats_last_update rendered invalid timestamp: 0
10:26:52 AM – (WARNING) Sensor
Setup failed for device_tracker: (DependencyError(...), 'Could not setup dependencies: zone')
10:26:31 AM – (ERROR) setup.py - message first occurred at 10:26:11 AM and shows up 2 times
Zigbee channel 11 utilization is 98.43%!
10:26:31 AM – (WARNING) components/zha/core/gateway.py - message first occurred at 10:26:31 AM and shows up 2 times
Entity sensor.wemosem2_amperaje (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'A' which is not a valid unit for the device class ('power') it is using; expected one of ['kW', 'W']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
10:26:26 AM – (WARNING) Sensor - message first occurred at 10:16:20 AM and shows up 8 times
Multiple Tasmota devices are sharing the same topic 'cmnd/xboxroom/'. Offending devices: 'Tasmota' (192.168.68.136), 'Tasmota' (192.168.68.160)
10:26:17 AM – (WARNING) Tasmota
Can't connect to ESPHome API for watermeter @ 192.168.68.132: Error connecting to ('192.168.68.132', 6053): [Errno 111] Connect call failed ('192.168.68.132', 6053) (SocketAPIError)
10:26:16 AM – (WARNING) runner.py - message first occurred at 10:26:16 AM and shows up 4 times
Error while setting up yamaha platform for media_player
10:26:16 AM – (ERROR) Media player
Invalid XML returned for request http://192.168.68.144:80/YamahaRemoteControl/desc.xml: b'File Not Found\n\nURI: /YamahaRemoteControl/desc.xml\nMethod: GET\nArguments: 0\n'
10:26:16 AM – (ERROR) /usr/local/lib/python3.11/site-packages/rxv/rxv.py
Error while setting up ytube_music_player platform for media_player
10:26:15 AM – (ERROR) Media player
Couldn't connect using mysql://****:****@core-mariadb/homeassistant?charset=utf8 DB_URL: (MySQLdb.OperationalError) (1698, "Access denied for user 'khazi'@'172.30.32.1'") (Background on this error at: https://sqlalche.me/e/20/e3q8)
10:26:15 AM – (ERROR) SQL
Error while setting up scrape platform for sensor
10:26:15 AM – (ERROR) Sensor
Login client response error: 403, message='Forbidden', url=URL('http://192.168.68.1/cgi-bin/luci/;stok=/login?form=login')
10:26:15 AM – (ERROR) TP-Link Deco (custom integration)
Setup of application_credentials is taking longer than 300 seconds. Startup will proceed without waiting any longer
10:26:07 AM – (ERROR) setup.py - message first occurred at 10:26:07 AM and shows up 12 times
Timed out adding entities for domain input_select with platform input_select after 500s
10:26:07 AM – (WARNING) input_select
Error doing job: Task exception was never retrieved
10:26:07 AM – (ERROR) /usr/src/homeassistant/homeassistant/runner.py
Connection closed: Cannot write to closing transport
10:26:07 AM – (WARNING) runner.py
Timed out adding entities for domain sensor with platform filter after 500s
10:26:07 AM – (WARNING) Sensor - message first occurred at 10:26:07 AM and shows up 2 times
Setup of platform template is taking longer than 60 seconds. Startup will proceed without waiting any longer.
10:26:07 AM – (ERROR) Sensor
Timed out adding entities for domain group with platform group after 500s
10:26:07 AM – (WARNING) Group
Setup of sensor platform filter is taking over 10 seconds.
10:26:07 AM – (WARNING) Sensor - message first occurred at 10:16:32 AM and shows up 7 times
Setup of input_button is taking over 10 seconds.
10:26:07 AM – (WARNING) runner.py - message first occurred at 10:16:32 AM and shows up 16 times
Automation with alias 'dstv_cluster_on' could not be validated and has been disabled: extra keys not allowed @ data['action'][4]['seconds']. Got 2 offset None should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ data['action'][4]['delay']. Got None
10:26:07 AM – (ERROR) Automation - message first occurred at 10:26:07 AM and shows up 8 times
Could not convert state: (<class 'str'>) to number
10:25:12 AM – (ERROR) filter - message first occurred at 10:16:20 AM and shows up 2 times
The 'include' option near /config/configuration.yaml:60 is deprecated, please remove it from your configuration
10:16:21 AM – (WARNING) History - message first occurred at 10:16:21 AM and shows up 2 times
The moon platform for the sensor integration does not support platform setup. Please remove it from your config.
10:16:20 AM – (ERROR) Sensor
Ended unfinished session (id=53 from 2023-11-16 07:39:47.026116)
10:16:15 AM – (WARNING) Recorder
Lovelace is running in storage mode. Define resources via user interface
10:16:13 AM – (WARNING) Dashboards

The esphome one is not appearing this time device_tracker.yaml is empty.

Configuration.yaml:


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
homeassistant: !include homeassistant_data.yaml
sensor: !include sensors.yaml
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:

google_assistant:
  project_id: casanuestra
  service_account: !include casanuestra-ed08b622201b.json
  report_state: true

counter: !include counters.yaml  
panel_iframe:
   music_assistant:   
     title: "REDACTED"   
     url: "REDACTED"   
     icon: mdi:music

tts:
  - platform: google_translate
    time_memory: 300

    service_name: google_translate_say

frontend:
  extra_module_url:
    - /local/community/lovelace-card-mod/card-mod.js



lovelace:
  resources:
  - url: /local/community/mini-graph-card/mini-graph-card-bundle.js
    type: module 
  - url: /local/comunity//mini-media-player/mini-media-player-bundle.js
    type: module
utility_meter: !include utility_meter.yaml     
input_number: !include input_number.yaml
group: !include groups.yaml
automation: !include_dir_merge_list automations/
script: !include scripts.yaml
scene: !include scenes.yaml
device_tracker: !include device_tracker.yaml

mqtt: !include mqtt_broker.yaml
zone: !include zones.yaml

input_boolean: !include booleans.yaml
notify: !include notifiers.yaml

telegram_bot: !include telegram_bot.yaml
conversation:
#speedtestdotnet: !include speedtester.yaml
media_player: !include media_players.yaml 
recorder: !include recorders.yaml
history: !include histories.yaml
person: !include persons.yaml
   

logbook: !include logbooks.yaml
template: !include sunsynk.yaml





python_script:

wake_on_lan:


1 Like

This thing is frustrating, now my input_booleans are not working, how do I fix the default config at least

1 Like

I had just started going through the log. That thing s bleeding and there’s all sorts of issues.

When did you split your config? Unfortunately that will make this harder to troubleshoot because all of those include files are basically part of config.yaml now and any one of them can cause the borking…

I have been running it split for a few years now, basically if I restart any of the cloned machines, I get it starts having errors, funny thing is that when I run check configuration, it does not flag anything, so I do not really know what to target, so maybe I should go through all the breaking changes from after 10.5

Yeahhh there’s a… Lot going on here. Do that I’ll keep reading to see if I can figure out when this is telling us.

Hi @NathanCu ,

As luck would have it, a frantic search aided by some glasses of wine yielded results last night, I managed to find an uncontaminated VM folder in the recycling bin, I restored the VM and started it, lo and behold it was working, what was puzzling was that it was also updated to 11.2 and I could have sworn that I did not update that particular one, I have no explanation for that, there is about 6 updates to do, but I will take my chances in the evening again :hand_with_index_finger_and_thumb_crossed: and update them and see if the problem comes back, for now all is well. :grinning: :+1:

1 Like

It was the mariadb database, i noticed the restart got stuck on the SQL screed for about 25min, since sql has to do with databases I decided to uninstall mariadb and reinstall it, after this I can do restarts and updates without issues.