Hi,
I'm getting the following error. Any idea what causing this? I do have a hot water channel for solar re-direction to my HWS. Any other logs you would need?
2024-02-23 12:55:48.302 ERROR (MainThread) [homeassistant.helpers.event] Error while dispatching event for sensor.sa_data_by_5min_time_stamp to <Job track state_changed event {'sensor.sa_data_by_5min_load_hot_water_generated', 'sensor.sa_data_by_5min_energy_consumed', 'sensor.sa_data_by_5min_time_stamp', 'sensor.sa_data_by_5min_load_hot_water', 'sensor.sa_todays_hot_water_generated', 'sensor.sa_data_by_5min_load_ev_charger', 'sensor.sa_data_by_5min_energy_generated'} HassJobType.Callback <bound method TrackTemplateResultInfo._refresh of <TrackTemplateResultInfo {Template<template=({{- states.sensor.sa_data_by_5min_load_hot_water_generated.state -2024-02-23 12:55:48.302 ERROR (MainThread) [homeassistant.helpers.event] Error while dispatching event for sensor.sa_data_by_5min_time_stamp to <Job track state_changed event {'sensor.sa_data_by_5min_load_hot_water_generated', 'sensor.sa_data_by_5min_energy_consumed', 'sensor.sa_data_by_5min_time_stamp', 'sensor.sa_data_by_5min_load_hot_water', 'sensor.sa_todays_hot_water_generated', 'sensor.sa_data_by_5min_load_ev_charger', 'sensor.sa_data_by_5min_energy_generated'} HassJobType.Callback <bound method TrackTemplateResultInfo._refresh of <TrackTemplateResultInfo {Template<template=({{- states.sensor.sa_data_by_5min_load_hot_water_generated.state -}}) renders=14>: <RenderInfo Template<template=({{- states.sensor.sa_data_by_5min_load_hot_water_generated.state -}}) renders=14> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.sa_data_by_5min_load_hot_water_generated'}) rate_limit=None has_time=False exception=None is_static=False>, Template<template=(total_increasing) renders=1578>: <RenderInfo Template<template=(total_increasing) renders=1578> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset() rate_limit=None has_time=False exception=None is_static=True>, Template<template=({{- states.sensor.sa_data_by_5min_time_stamp.state -}}) renders=994>: <RenderInfo Template<template=({{- states.sensor.sa_data_by_5min_time_stamp.state -}}) renders=994> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.sa_data_by_5min_time_stamp'}) rate_limit=None has_time=False exception=None is_static=False>, Template<template=({%- if ( states.sensor.sa_data_by_5min_load_hot_water.state|is_number )
and ( states.sensor.sa_data_by_5min_energy_consumed.state|is_number )
and ( states.sensor.sa_data_by_5min_energy_generated.state|is_number )
and ( states.sensor.sa_data_by_5min_load_ev_charger.state|is_number )
and ( states.sensor.sa_data_by_5min_load_air_conditioner.state|is_number )
-%}
{%- if states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0) > 0.0 -%}
{%- if (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0)) >=
( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0)) )
-%}
{{- states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0) -}}
{%- elif (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0)) >
( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0)) )
-%}
{{- (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0))
- ( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0)) )
-}}
{%- else -%}
0.0
{%- endif %}
{%- else -%}
0.0
{%- endif -%}
{%- else -%}
{{- state_attr( 'sensor.sa_todays_hot_water_generated', 'hw_energy_last5min' )
if states.sensor.sa_todays_hot_water_generated.attributes.hw_energy_last5min|is_number
else "0.0"
-}}
{%- endif -%}) renders=2264>:
and ( states.sensor.sa_data_by_5min_energy_consumed.state|is_number )
and ( states.sensor.sa_data_by_5min_energy_generated.state|is_number )
and ( states.sensor.sa_data_by_5min_load_ev_charger.state|is_number )
and ( states.sensor.sa_data_by_5min_load_air_conditioner.state|is_number )
-%}
{%- if states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0) > 0.0 -%}
{%- if (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0)) >=
( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0)) )
-%}
{{- states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0) -}}
{%- elif (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0)) >
( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0)) )
-%}
{{- (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0))
- ( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0)) )
-}}
{%- else -%}
0.0
{%- endif %}
{%- else -%}
0.0
{%- endif -%}
{%- else -%}
{{- state_attr( 'sensor.sa_todays_hot_water_generated', 'hw_energy_last5min' )
if states.sensor.sa_todays_hot_water_generated.attributes.hw_energy_last5min|is_number
else "0.0"
-}}
{%- endif -%}) renders=2264> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.sa_data_by_5min_energy_consumed', 'sensor.sa_data_by_5min_load_hot_water', 'sensor.sa_todays_hot_water_generated', 'sensor.sa_data_by_5min_load_ev_charger', 'sensor.sa_data_by_5min_energy_generated'}) rate_limit=None has_time=False exception=None is_static=False>, Template
and ( states.sensor.sa_data_by_5min_load_hot_water_total.state|is_number )
-%}
{% if ( states.sensor.sa_data_by_5min_load_hot_water_total.state|float(0.0) > 0.0 ) -%}
{{- (( states.sensor.sa_data_by_5min_load_hot_water_generated.state|float(0.0) )
/ (states.sensor.sa_data_by_5min_load_hot_water_total.state|float|default('none')) * 100.0 ) | int
-}}
{%- else -%}
none
{%- endif -%}
{%- else -%}
none
{%- endif -%}) renders=18>:
and ( states.sensor.sa_data_by_5min_load_hot_water_total.state|is_number )
-%}
{% if ( states.sensor.sa_data_by_5min_load_hot_water_total.state|float(0.0) > 0.0 ) -%}
{{- (( states.sensor.sa_data_by_5min_load_hot_water_generated.state|float(0.0) )
/ (states.sensor.sa_data_by_5min_load_hot_water_total.state|float|default('none')) * 100.0 ) | int
-}}
{%- else -%}
none
{%- endif -%}
{%- else -%}
none
{%- endif -%}) renders=18> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.sa_data_by_5min_load_hot_water_generated'}) rate_limit=None has_time=False exception=None is_static=False>, Template: all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset() rate_limit=None has_time=False exception=None is_static=True>}>>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 664, 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 667, 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/src/homeassistant/homeassistant/helpers/event.py", line 296, in _async_dispatch_entity_id_event
hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 700, in async_run_hass_job
hassjob.target(*args)
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 700, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 434, in _handle_results
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 989, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1110, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1047, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 995, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 671, in state
raise ValueError(
ValueError: Sensor sensor.sa_todays_hot_water_generated has device class 'energy', state class 'None' unit 'Wh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unknown' ()}}) renders=14>: <RenderInfo Template<template=({{- states.sensor.sa_data_by_5min_load_hot_water_generated.state -}}) renders=14> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.sa_data_by_5min_load_hot_water_generated'}) rate_limit=None has_time=False exception=None is_static=False>, Template<template=(total_increasing) renders=1578>: <RenderInfo Template<template=(total_increasing) renders=1578> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset() rate_limit=None has_time=False exception=None is_static=True>, Template<template=({{- states.sensor.sa_data_by_5min_time_stamp.state -}}) renders=994>: <RenderInfo Template<template=({{- states.sensor.sa_data_by_5min_time_stamp.state -}}) renders=994> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.sa_data_by_5min_time_stamp'}) rate_limit=None has_time=False exception=None is_static=False>, Template<template=({%- if ( states.sensor.sa_data_by_5min_load_hot_water.state|is_number )
and ( states.sensor.sa_data_by_5min_energy_consumed.state|is_number )
and ( states.sensor.sa_data_by_5min_energy_generated.state|is_number )
and ( states.sensor.sa_data_by_5min_load_ev_charger.state|is_number )
and ( states.sensor.sa_data_by_5min_load_air_conditioner.state|is_number )
-%}
{%- if states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0) > 0.0 -%}
{%- if (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0)) >=
( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0)) )
-%}
{{- states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0) -}}
{%- elif (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0)) >
( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0)) )
-%}
{{- (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0))
- ( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0)) )
-}}
{%- else -%}
0.0
{%- endif %}
{%- else -%}
0.0
{%- endif -%}
{%- else -%}
{{- state_attr( 'sensor.sa_todays_hot_water_generated', 'hw_energy_last5min' )
if states.sensor.sa_todays_hot_water_generated.attributes.hw_energy_last5min|is_number
else "0.0"
-}}
{%- endif -%}) renders=2264>:
and ( states.sensor.sa_data_by_5min_energy_consumed.state|is_number )
and ( states.sensor.sa_data_by_5min_energy_generated.state|is_number )
and ( states.sensor.sa_data_by_5min_load_ev_charger.state|is_number )
and ( states.sensor.sa_data_by_5min_load_air_conditioner.state|is_number )
-%}
{%- if states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0) > 0.0 -%}
{%- if (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0)) >=
( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0)) )
-%}
{{- states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0) -}}
{%- elif (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0)) >
( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0)) )
-%}
{{- (states.sensor.sa_data_by_5min_energy_generated.state|float(0.0))
- ( (states.sensor.sa_data_by_5min_energy_consumed.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_ev_charger.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_air_conditioner.state|float(0.0))
- (states.sensor.sa_data_by_5min_load_hot_water.state|float(0.0)) )
-}}
{%- else -%}
0.0
{%- endif %}
{%- else -%}
0.0
{%- endif -%}
{%- else -%}
{{- state_attr( 'sensor.sa_todays_hot_water_generated', 'hw_energy_last5min' )
if states.sensor.sa_todays_hot_water_generated.attributes.hw_energy_last5min|is_number
else "0.0"
-}}
{%- endif -%}) renders=2264> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.sa_data_by_5min_energy_consumed', 'sensor.sa_data_by_5min_load_hot_water', 'sensor.sa_todays_hot_water_generated', 'sensor.sa_data_by_5min_load_ev_charger', 'sensor.sa_data_by_5min_energy_generated'}) rate_limit=None has_time=False exception=None is_static=False>, Template
and ( states.sensor.sa_data_by_5min_load_hot_water_total.state|is_number )
-%}
{% if ( states.sensor.sa_data_by_5min_load_hot_water_total.state|float(0.0) > 0.0 ) -%}
{{- (( states.sensor.sa_data_by_5min_load_hot_water_generated.state|float(0.0) )
/ (states.sensor.sa_data_by_5min_load_hot_water_total.state|float|default('none')) * 100.0 ) | int
-}}
{%- else -%}
none
{%- endif -%}
{%- else -%}
none
{%- endif -%}) renders=18>:
and ( states.sensor.sa_data_by_5min_load_hot_water_total.state|is_number )
-%}
{% if ( states.sensor.sa_data_by_5min_load_hot_water_total.state|float(0.0) > 0.0 ) -%}
{{- (( states.sensor.sa_data_by_5min_load_hot_water_generated.state|float(0.0) )
/ (states.sensor.sa_data_by_5min_load_hot_water_total.state|float|default('none')) * 100.0 ) | int
-}}
{%- else -%}
none
{%- endif -%}
{%- else -%}
none
{%- endif -%}) renders=18> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({'sensor.sa_data_by_5min_load_hot_water_generated'}) rate_limit=None has_time=False exception=None is_static=False>, Template: all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset() rate_limit=None has_time=False exception=None is_static=True>}>>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 664, 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 667, 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/src/homeassistant/homeassistant/helpers/event.py", line 296, in _async_dispatch_entity_id_event
hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 700, in async_run_hass_job
hassjob.target(*args)
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 700, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 434, in _handle_results
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 989, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1110, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1047, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 995, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 671, in state
raise ValueError(
ValueError: Sensor sensor.sa_todays_hot_water_generated has device class 'energy', state class 'None' unit 'Wh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unknown' ()