With 113.1 sensor template error fine in developer tools, in sensor is unavailable

Have thios sensor sionce long time, now it gives error with new 113.1
How to fix?

In template is working, so code is still valid I think. The sensor is unavailable


- platform: template

    sensors:

        potenza_generale_totale:

            friendly_name: "Potenza generale totale"

            unit_of_measurement: 'W'

            value_template: '{{ states("sensor.potenza_generale_interno_1") |float + states("sensor.potenza_generale_interno_2") | float + states("sensor.potenza_generale_interno_3") | float + states("sensor.potenza_generale_interno_4") | float }}'

I even restarted HASS, all 4 sensors of the sum are numeric (no unknown or unavaiulable state).

{{ states(“sensor.potenza_generale_interno_1”) |float + states(“sensor.potenza_generale_interno_2”) | float + states(“sensor.potenza_generale_interno_3”) | float + states(“sensor.potenza_generale_interno_4”) | float }}

in deveoper tools template gives the correct value.

But the sensor is unavailable … evben after a restart. ???

I can’t see anything wrong with it. Does the state change if you use the update entity service in the developer tools?

If so you could try listing the four entity id’s in the sensor so the template knows what to monitor for updates.

Hi, I do not understand …" Does the state change if you use the update entity service in the developer tools?" ?

I put
{{ states(“sensor.potenza_generale_interno_1”) |float + states(“sensor.potenza_generale_interno_2”) | float + states(“sensor.potenza_generale_interno_3”) | float + states(“sensor.potenza_generale_interno_4”) | float }

in developer tools on the left, and automatically on the right I have the value (which is a correct numeric value 1.387.00 in the picture)

But if I go to the
Configuration
Entities
I get the Entity, sensor.potenza_generale_totale it has the state Unavailable

Cattura

Please note that was perfectly working for weeks now, problem started this morning (not sure if related to the update to 113.1 or not)

how you do that? Like this? I can try … but why was working before not now


- platform: template

    sensors:

        potenza_generale_totale:

            friendly_name: "Potenza generale totale"

            unit_of_measurement: 'W'

            entity_id: 

              - sensor.potenza_generale_interno_1

              - sensor.potenza_generale_interno_2

              - sensor.potenza_generale_interno_3

              - sensor.potenza_generale_interno_4

            value_template: '{{ states("sensor.potenza_generale_interno_1") | float + states("sensor.potenza_generale_interno_2") | float + states("sensor.potenza_generale_interno_3") | float + states("sensor.potenza_generale_interno_4") | float }}'

This:

:man_shrugging:

Yes it updated it… Mmmhhh hope do not need to make an automation for that

Adding all four of the entities to the sensor should do it. It will update when any of them change.

It’s a fairly simple template. Home assistant should be able to extract the entities to monitor automatically. The fact that it isn’t happening could mean an issue has been introduced. Is it only this template you are having trouble with?

I explicitly list all my entities in my template sensors so am not a good comparison test .

So far yes

Did adding all four entities fix the issue?

it did at the beginning. Now upgrading from 113.1 to .3 have again the same issue. To fix, I have to call the homeassistant upgrade entity

Are there any errors in the home assistant system log (configuration / logs)?

Checked, none that I noticed