home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.75k stars 28.91k forks source link

Multiple integrations/Components fail or take way too long #107371

Closed Pefi89 closed 2 months ago

Pefi89 commented 6 months ago

home-assistant_2024-01-06T12-19-47.701Z.log

The problem

For some reason my homeassistant is beginning to take forever to load. I've tried restoring, and it solves the problem for some time, but eventually i pops back up. load times for some intergrations take an excess of 800+ seconds, some even 2000. In the log i'm not able to locate any issue - it's attached.

What version of Home Assistant Core has the issue?

2023.12

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-01-06 13:11:54.311 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform filter is taking over 10 seconds.
2024-01-06 13:11:54.311 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
2024-01-06 13:11:54.311 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
2024-01-06 13:11:54.312 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform template is taking over 10 seconds.
2024-01-06 13:11:54.323 WARNING (MainThread) [homeassistant.components.sensor] Timed out adding entities for domain sensor with platform filter after 500s
2024-01-06 13:11:54.328 ERROR (MainThread) [homeassistant.components.sensor] Setup of platform template is taking longer than 60 seconds. Startup will proceed without waiting any longer.
2024-01-06 13:11:54.334 WARNING (MainThread) [homeassistant.components.sensor] Timed out adding entities for domain sensor with platform template after 500s
2024-01-06 13:11:54.343 ERROR (MainThread) [hass_nabucasa.remote] Can't update remote details from Home Assistant cloud (timeout)
2024-01-06 13:11:54.377 ERROR (MainThread) [homeassistant.setup] Setup of 'scene' is taking longer than 300 seconds. Startup will proceed without waiting any longer
2024-01-06 13:11:54.402 ERROR (MainThread) [homeassistant.setup] Setup of 'zone' is taking longer than 300 seconds. Startup will proceed without waiting any longer
2024-01-06 13:11:54.417 ERROR (MainThread) [homeassistant.setup] Setup of 'counter' is taking longer than 300 seconds. Startup will proceed without waiting any longer
2024-01-06 13:11:54.462 ERROR (MainThread) [hass_nabucasa.iot] Unexpected error in on_connect <bound method Cloudhooks.async_publish_cloudhooks of <hass_nabucasa.cloudhooks.Cloudhooks object at 0x7fa24cc7d0>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/hass_nabucasa/cloudhooks.py", line 29, in async_publish_cloudhooks
    await self.cloud.iot.async_send_message(
  File "/usr/local/lib/python3.11/site-packages/hass_nabucasa/iot.py", line 81, in async_send_message
    await self.async_send_json_message(
  File "/usr/local/lib/python3.11/site-packages/hass_nabucasa/iot_base.py", line 121, in async_send_json_message
    await self.client.send_json(message)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_ws.py", line 179, in send_json
    await self.send_str(dumps(data), compress=compress)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_ws.py", line 165, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_websocket.py", line 729, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_websocket.py", line 675, in _send_frame
    self._write(header + mask + message)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_websocket.py", line 702, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
2024-01-06 13:11:55.519 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'device_tracker'. Setup failed for dependencies: zone
2024-01-06 13:11:55.519 ERROR (MainThread) [homeassistant.setup] Setup failed for 'device_tracker': (DependencyError(...), 'Could not setup dependencies: zone')
2024-01-06 13:11:57.026 WARNING (MainThread) [hass_nabucasa.cloud_api] Fetched https://alexa-api.nabucasa.com/access_token (400)
2024-01-06 13:11:57.034 WARNING (MainThread) [hass_nabucasa.iot] Connection closed: Cannot write to closing transport
2024-01-06 13:11:57.446 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.eforsyning_water_used (<class 'custom_components.eforsyning.sensor.EforsyningSensor'>) is using state class 'measurement' which is impossible considering device class ('water') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/kpoppel/homeassistant-eforsyning/issues
2024-01-06 13:11:57.447 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.eforsyning_water_exp_used (<class 'custom_components.eforsyning.sensor.EforsyningSensor'>) is using state class 'measurement' which is impossible considering device class ('water') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/kpoppel/homeassistant-eforsyning/issues
2024-01-06 13:11:57.501 WARNING (MainThread) [custom_components.localtuya.common] [bf5...kab] Failed to connect to 192.168.0.116: [Errno 113] Connect call failed ('192.168.0.116', 6668)
2024-01-06 13:12:00.681 WARNING (MainThread) [hass_nabucasa.cloud_api] Fetched https://alexa-api.nabucasa.com/access_token (400)
2024-01-06 13:12:06.180 ERROR (MainThread) [frontend.js.latest.202312082] Uncaught error from Firefox 121.0 on Windows 10
Error: Failed to execute 'define' on 'CustomElementRegistry': the name "slider-entity-row-editor" has already been used with this registry
87659/</window.CustomElementRegistry.prototype.define (src/scoped-custom-element-registry.js:44:14)
/hacsfiles/lovelace-slider-entity-row/slider-entity-row.js:16:254
2024-01-06 13:12:44.188 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'default_config'. Setup failed for dependencies: counter, scene, zone
2024-01-06 13:12:44.188 ERROR (MainThread) [homeassistant.setup] Setup failed for 'default_config': (DependencyError(...), 'Could not setup dependencies: counter, scene, zone')
2024-01-06 13:12:44.688 WARNING (MainThread) [hass_nabucasa.cloud_api] Fetched https://alexa-api.nabucasa.com/access_token (400)
2024-01-06 13:12:44.690 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 542, in _handle_entity_registry_updated
    await self._sync_helper(to_update, to_remove)
  File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 480, in _sync_helper
    await self.async_get_access_token()
  File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 333, in async_get_access_token
    raise alexa_errors.RequireRelink
homeassistant.components.alexa.errors.RequireRelink
2024-01-06 13:12:49.469 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: dlna_dmr, media_player.dlna_dmr
2024-01-06 13:12:57.373 WARNING (MainThread) [custom_components.localtuya.common] [bf5...kab] Failed to connect to 192.168.0.116: [Errno 113] Connect call failed ('192.168.0.116', 6668)
2024-01-06 13:13:28.803 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ states('sensor.shellyem3_349454755979_channel_c_energy')|float |round (2) }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1926, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unavailable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 569, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2247, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1929, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1627, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ states('sensor.shellyem3_349454755979_channel_c_energy')|float |round (2) }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 695, in async_render_to_info
    render_info._result = self.async_render(
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 571, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ states('sensor.shellyem3_349454755979_channel_c_energy')|float |round (2) }}' but no default was specified
2024-01-06 13:13:28.817 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ states('sensor.shellyem3_349454755979_channel_c_energy')|float |round (2) }}' but no default was specified') while processing template 'Template<template=({{ states('sensor.shellyem3_349454755979_channel_c_energy')|float |round (2) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.hus_l3'
2024-01-06 13:13:28.819 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ states('sensor.shellyem3_349454755979_channel_b_energy')| float |round (2) }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1926, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unavailable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 569, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2247, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1929, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1627, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ states('sensor.shellyem3_349454755979_channel_b_energy')| float |round (2) }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 695, in async_render_to_info
    render_info._result = self.async_render(
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 571, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ states('sensor.shellyem3_349454755979_channel_b_energy')| float |round (2) }}' but no default was specified
2024-01-06 13:13:28.828 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ states('sensor.shellyem3_349454755979_channel_b_energy')| float |round (2) }}' but no default was specified') while processing template 'Template<template=({{ states('sensor.shellyem3_349454755979_channel_b_energy')| float |round (2) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.hus_l2'
2024-01-06 13:13:28.829 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ states('sensor.shellyem3_349454755979_channel_a_energy')| float |round (2) }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1926, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unavailable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 569, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2247, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1929, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1627, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ states('sensor.shellyem3_349454755979_channel_a_energy')| float |round (2) }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 695, in async_render_to_info
    render_info._result = self.async_render(
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 571, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ states('sensor.shellyem3_349454755979_channel_a_energy')| float |round (2) }}' but no default was specified
2024-01-06 13:13:28.838 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ states('sensor.shellyem3_349454755979_channel_a_energy')| float |round (2) }}' but no default was specified') while processing template 'Template<template=({{ states('sensor.shellyem3_349454755979_channel_a_energy')| float |round (2) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.hus_l1'
2024-01-06 13:13:28.842 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ (states('sensor.shellyem3_349454755979_channel_a_power')|float+states('sensor.shellyem3_349454755979_channel_b_power')|float+states('sensor.shellyem3_349454755979_channel_c_power')|float)|round }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1926, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unavailable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 569, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2247, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1929, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1627, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ (states('sensor.shellyem3_349454755979_channel_a_power')|float+states('sensor.shellyem3_349454755979_channel_b_power')|float+states('sensor.shellyem3_349454755979_channel_c_power')|float)|round }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 695, in async_render_to_info
    render_info._result = self.async_render(
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 571, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ (states('sensor.shellyem3_349454755979_channel_a_power')|float+states('sensor.shellyem3_349454755979_channel_b_power')|float+states('sensor.shellyem3_349454755979_channel_c_power')|float)|round }}' but no default was specified
2024-01-06 13:13:28.850 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unavailable' when rendering template '{{ (states('sensor.shellyem3_349454755979_channel_a_power')|float+states('sensor.shellyem3_349454755979_channel_b_power')|float+states('sensor.shellyem3_349454755979_channel_c_power')|float)|round }}' but no default was specified') while processing template 'Template<template=({{ (states('sensor.shellyem3_349454755979_channel_a_power')|float+states('sensor.shellyem3_349454755979_channel_b_power')|float+states('sensor.shellyem3_349454755979_channel_c_power')|float)|round }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.hus_forbrug_total'
2024-01-06 13:13:28.875 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({% set indoor = states('sensor.luftkvalitet_temperature') | float %} {% set outdoor = states('sensor.stue_outside_temperature') | float %} {% set power = states('sensor.watts_live_11d104220001964_positive_active_power') | float %} {{ power/(indoor - outdoor) | round(1, default=0) }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1926, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unknown'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 569, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2247, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1929, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1627, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unknown' when rendering template '{% set indoor = states('sensor.luftkvalitet_temperature') | float %} {% set outdoor = states('sensor.stue_outside_temperature') | float %} {% set power = states('sensor.watts_live_11d104220001964_positive_active_power') | float %} {{ power/(indoor - outdoor) | round(1, default=0) }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 695, in async_render_to_info
    render_info._result = self.async_render(
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 571, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unknown' when rendering template '{% set indoor = states('sensor.luftkvalitet_temperature') | float %} {% set outdoor = states('sensor.stue_outside_temperature') | float %} {% set power = states('sensor.watts_live_11d104220001964_positive_active_power') | float %} {{ power/(indoor - outdoor) | round(1, default=0) }}' but no default was specified
2024-01-06 13:13:28.883 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{% set indoor = states('sensor.luftkvalitet_temperature') | float %} {% set outdoor = states('sensor.stue_outside_temperature') | float %} {% set power = states('sensor.watts_live_11d104220001964_positive_active_power') | float %} {{ power/(indoor - outdoor) | round(1, default=0) }}' but no default was specified') while processing template 'Template<template=({% set indoor = states('sensor.luftkvalitet_temperature') | float %} {% set outdoor = states('sensor.stue_outside_temperature') | float %} {% set power = states('sensor.watts_live_11d104220001964_positive_active_power') | float %} {{ power/(indoor - outdoor) | round(1, default=0) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.hus_varme_tab'
2024-01-06 13:13:28.893 ERROR (MainThread) [homeassistant] 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
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 616, in state
    numerical_value = int(value)
                      ^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'unknown'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 619, in state
    numerical_value = float(value)
                      ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unknown'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1236, in _onetime_listener
    self._hass.async_run_job(listener, event)
  File "/usr/src/homeassistant/homeassistant/core.py", line 719, in async_run_job
    return self.async_run_hass_job(HassJob(target), *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 671, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/helpers/start.py", line 40, in _matched_event
    hass.async_run_hass_job(at_start_job, hass)
  File "/usr/src/homeassistant/homeassistant/core.py", line 671, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 478, in _async_template_startup
    result_info.async_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1035, in async_refresh
    self._refresh(None)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1215, in _refresh
    self.hass.async_run_hass_job(self._job, event, updates)
  File "/usr/src/homeassistant/homeassistant/core.py", line 671, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 429, in _handle_results
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 745, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in _async_write_ha_state
    state, attr = self._async_generate_attributes()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 786, in _async_generate_attributes
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 751, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 623, in state
    raise ValueError(
ValueError: Sensor sensor.watts_live_lifetime_consumption has device class 'energy', state class 'total_increasing' unit 'Wh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unknown' (<class 'str'>)
2024-01-06 13:13:28.919 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ ((states('sensor.port_tilstand_angle_z')|float + 85) / 100*100)|round(2) }}) renders=2>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1926, in forgiving_float_filter
    return float(value)
           ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unknown'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 569, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2247, in _render_with_context
    return template.render(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1929, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1627, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ ((states('sensor.port_tilstand_angle_z')|float + 85) / 100*100)|round(2) }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 695, in async_render_to_info
    render_info._result = self.async_render(
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 571, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ ((states('sensor.port_tilstand_angle_z')|float + 85) / 100*100)|round(2) }}' but no default was specified
2024-01-06 13:13:28.927 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{ ((states('sensor.port_tilstand_angle_z')|float + 85) / 100*100)|round(2) }}' but no default was specified') while processing template 'Template<template=({{ ((states('sensor.port_tilstand_angle_z')|float + 85) / 100*100)|round(2) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.gate_open'
2024-01-06 13:13:29.895 ERROR (MainThread) [homeassistant.components.homekit.type_thermostats] climate.nilan: Received invalid HVAC mode: unavailable
2024-01-06 13:13:31.187 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.stue_stik_current (A) cannot be converted to the unit of previously compiled statistics (W). Generation of long term statistics will be suppressed unless the unit changes back to W or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-01-06 13:13:31.187 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.stue_stik_voltage (V) cannot be converted to the unit of previously compiled statistics (W). Generation of long term statistics will be suppressed unless the unit changes back to W or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-01-06 13:13:32.923 WARNING (Recorder) [homeassistant.components.sensor.recorder] Entity sensor.watts_live_lifetime_consumption from integration template has state class total_increasing, but its state is not strictly increasing. Triggered by state 2749 (2750.0) with last_updated set to 2024-01-06T11:50:45.601628+00:00. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+template%22
2024-01-06 13:13:39.386 WARNING (MainThread) [hass_nabucasa.cloud_api] Fetched https://alexa-api.nabucasa.com/access_token (400)
2024-01-06 13:13:39.387 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 542, in _handle_entity_registry_updated
    await self._sync_helper(to_update, to_remove)
  File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 480, in _sync_helper
    await self.async_get_access_token()
  File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 333, in async_get_access_token
    raise alexa_errors.RequireRelink
homeassistant.components.alexa.errors.RequireRelink
2024-01-06 13:13:57.374 WARNING (MainThread) [custom_components.localtuya.common] [bf5...kab] Failed to connect to 192.168.0.116: [Errno 113] Connect call failed ('192.168.0.116', 6668)
2024-01-06 13:14:33.208 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.watts_live_11d104220001964_negative_reactive_energy (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'varh' which is not a valid unit for the device class ('energy') it is using; expected one of ['MWh', 'GJ', 'MJ', 'Wh', 'kWh']; 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
2024-01-06 13:14:33.218 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.watts_live_11d104220001964_positive_reactive_energy (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'varh' which is not a valid unit for the device class ('energy') it is using; expected one of ['MWh', 'GJ', 'MJ', 'Wh', 'kWh']; 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
2024-01-06 13:14:57.374 WARNING (MainThread) [custom_components.localtuya.common] [bf5...kab] Failed to connect to 192.168.0.116: [Errno 113] Connect call failed ('192.168.0.116', 6668)
2024-01-06 13:15:48.189 ERROR (MainThread) [custom_components.miele] Timeout fetching miele data
2024-01-06 13:15:48.211 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: could not convert str to datetime: 'unavailable'') while processing template 'Template<template=({% set slut_kl = states('sensor.vaskemaskine_slut_kl') %} {% if slut_kl == "unknown" %} {% elif today_at(slut_kl) < now()  %} {{ today_at(slut_kl) + timedelta(days=1)  }} {% else %} {{ today_at(slut_kl) }} {% endif %}) renders=6>' for attribute 'end_time' in entity 'sensor.washing_machine'
2024-01-06 13:15:48.213 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError('ValueError: could not convert str to datetime: 'unavailable'') while processing template 'Template<template=({% set started_at = states('sensor.vaskemaskine_start_kl') %} {% if started_at == "unknown" %} {% elif today_at(started_at) > now()  %} {{ today_at(started_at) + timedelta(days=-1)  }} {% else %} {{ today_at(started_at) }} {% endif %}) renders=6>' for attribute 'start_time' in entity 'sensor.washing_machine'
2024-01-06 13:15:57.374 WARNING (MainThread) [custom_components.localtuya.common] [bf5...kab] Failed to connect to 192.168.0.116: [Errno 113] Connect call failed ('192.168.0.116', 6668)
2024-01-06 13:16:57.373 WARNING (MainThread) [custom_components.localtuya.common] [bf5...kab] Failed to connect to 192.168.0.116: [Errno 113] Connect call failed ('192.168.0.116', 6668)
2024-01-06 13:17:57.374 WARNING (MainThread) [custom_components.localtuya.common] [bf5...kab] Failed to connect to 192.168.0.116: [Errno 113] Connect call failed ('192.168.0.116', 6668)
2024-01-06 13:18:57.374 WARNING (MainThread) [custom_components.localtuya.common] [bf5...kab] Failed to connect to 192.168.0.116: [Errno 113] Connect call failed ('192.168.0.116', 6668)

Additional information

No response

codyc1515 commented 5 months ago

Have you tried isolating your custom_components (i.e. miele, localtuya)? I faced this issue before and it was a faulty custom_component.

Pefi89 commented 5 months ago

Have you tried isolating your custom_components (i.e. miele, localtuya)? I faced this issue before and it was a faulty custom_component.

How would I do that? Do you have a source of reference?

codyc1515 commented 5 months ago

Remove them from Devices and services then restart HA.

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.