Today after installing the 2025.2.4 update, one of my template sensors no longer works and I cannot figure out why.
The only hint I have is this message when I try to view the sensor:
This entity is no longer being provided by the template integration. If the entity is no longer in use, delete it in settings.
Here is the template, which was working before the update:
template:
- trigger:
- platform: homeassistant
event: start
- platform: state
entity_id: weather.home
action:
- action: weather.get_forecasts
data:
type: daily
target:
entity_id: weather.home
response_variable: daily
sensor:
- name: Today's Forecast Temperature
unique_id: temperature_forecast_today
state: "{{ daily['weather.home'].forecast[0].temperature }}"
unit_of_measurement: "°F"
Found this error in the log:
Error adding entity sensor.today_s_forecast_temperature for domain sensor with platform template
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 640, in state
numerical_value = float(value) # type:ignore[arg-type]
ValueError: could not convert string to float: 'None'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 609, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 928, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1384, in add_to_platform_finish
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1029, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 642, in state
raise ValueError(
...<5 lines>...
) from err
ValueError: Sensor sensor.today_s_forecast_temperature has device class 'None', state class 'None' unit '°F' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'None' (<class 'str'>)