Klagio
(Klagio)
July 29, 2020, 8:13am
1
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 }}'
Klagio
(Klagio)
July 29, 2020, 8:29am
2
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. ???
tom_l
July 29, 2020, 9:04am
3
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.
Klagio
(Klagio)
July 29, 2020, 9:39am
4
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
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)
Klagio
(Klagio)
July 29, 2020, 9:45am
5
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 }}'
Klagio
(Klagio)
July 29, 2020, 10:10am
7
Yes it updated it… Mmmhhh hope do not need to make an automation for that
tom_l
July 29, 2020, 10:14am
8
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 .
tom_l
July 29, 2020, 12:17pm
10
Did adding all four entities fix the issue?
Klagio
(Klagio)
August 3, 2020, 9:17am
11
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
tom_l
August 3, 2020, 9:21am
12
Are there any errors in the home assistant system log (configuration / logs)?
Klagio
(Klagio)
August 3, 2020, 10:30am
13
Checked, none that I noticed