hass-node-red icon indicating copy to clipboard operation
hass-node-red copied to clipboard

Energy entities stopped working in the Energy panel with version 4.01

Open driagi opened this issue 1 year ago • 7 comments

Describe the bug

After updating to version 4.0.1, the Energy panel stopped working (undefined entity) My configuration: Node-Red Companion: 4.01 Core: 2024.7.2 Supervisor: 2024.06.2 Operating System: 12.4

To Reproduce

  1. Create a energy entity
  2. Add Entity to Energy panel

Expected behavior

No response

Screenshots

image image image

Example Flow

No response

Environment Information

Version: 0.65.1

Home Assistant version: 2024.7.2 Companion version: 4.0.1

Node-RED version: 4.0.2 Docker: yes Add-on: no

Node.js version: v18.20.3 arm64 linux OS: Linux 6.6.31-haos-raspi arm64

Additional context

No response

driagi avatar Jul 15 '24 08:07 driagi

Is there something wrong with the issue?

driagi avatar Jul 22 '24 09:07 driagi

What does the state for those two entities show in the developers tools in HA?

zachowj avatar Jul 22 '24 19:07 zachowj

They don't exist, but I think they've changed names. For example: from sensor.nr_consumo_totale_2 to sensor.consumo_totale it seems to have changed to the Friendly name

image

image

image

driagi avatar Jul 23 '24 12:07 driagi

Yes, I tested it and confirm that it takes the form sensor.friendlyname

image

image

driagi avatar Jul 23 '24 12:07 driagi

The first time you create an entity from NR it will attempt to create an entity ID from the friendly name field. If the friendly name field is blank the entity id will default to sensor.nodered_<node id >. After the entity has been created in HA for the first time, the friendly name field controls only the friendly name in HA. It will not change the entity ID field. That has to be done through HA.

zachowj avatar Jul 23 '24 20:07 zachowj

But the entity name changed on day 7 after the update (4.0.1 Comapanion version). I didn't create or change anything, i in fact the energy panel worked well for months until day 7

driagi avatar Jul 24 '24 15:07 driagi

I have Node-RED version 4.0.2 and I solved reading via API from SolarX in the following way:

  1. API call every 2 minutes. (max. API is 10 queries per 1 min)
  2. Querying the API with the "http request" block
  3. transfer of individual data from the API to specific devices in HA via the "sensor" block - each value in a separate block

This solution works very well, I did it about a week ago and I don't have any problems with it so far, all values ​​are transferred correctly, except that HA shows data at 5-minute intervals, so I think that it would be possible to easily reduce API polling to 1x every 4- 5 min. The green "debug" blocks are only for testing in case of read failure

obraz obraz obraz obraz obraz obraz obraz obraz obraz obraz

PaviAN31 avatar Aug 10 '24 11:08 PaviAN31

Solved by renaming the entity

driagi avatar Sep 27 '24 12:09 driagi