I have some old entities that I can’t get rid of. I’m not sure if it’s an error in an integration, or something in HA itself, so thought maybe someone can help.
It’s basically the problem in this topic . Somehow I ended up with double all the entities of the integration, and I can’t find out how to get rid of them.
Any help would be appreciated!
See the screenshot for the entities I mean:
parautenbach
(Pieter Rautenbach)
November 15, 2022, 10:40am
2
Did you try to go to the entities page under settings and remove them there?
You might need to remove the integration, remove all the entities and then add the integration again. But, one of the two sets of entities (probably those without the 2 suffix) you should be able to remove and then you just rename the newer ones.
I tried removing the integration, then all the entities, and then re-installing. Unfortunately they all came back.
parautenbach
(Pieter Rautenbach)
November 15, 2022, 2:53pm
4
Have you tried checking the open issues of said integration?
Yup, nothing in there, also not in the closed issues. I can add an issue of course, but I wouldn’t know where to start to give all the info needed to add a proper issue, other than the data I provided above. I might try adding it after all and see what the maintainer(s) say.
ronvl
(Ron)
November 25, 2022, 1:42pm
6
I have the same issue… treid to remove them from core.entity_registry as well but they just cam back… the entities come from Modbus integration after playing arround with the sensors comming from Modbus… It is a pain now to select the right entity due to the longnames and the _2 added at the end…
parautenbach
(Pieter Rautenbach)
November 26, 2022, 7:56am
7
For either of you: How are your integrations connecting to HA? Via MQTT?
ronvl
(Ron)
November 26, 2022, 10:55am
8
Standard Modbus integration from HA
I have the same issue. Added some modbus sensors to my configuration.yaml
and played with them, incl. renaming. I also commented some of out again since I will not use them. However, all of them are still showing up in the overview, including renamed ones, with their “old” and “new” names.
In the “Entities” list, they show up as “Read-only”, so I cannot delete them there.
They are neither listed in core.device_registry
nor core.entity_registry
and my HA installation is still very vanilla as I just started to play with it and have absolutely no automations etc. yet.
totolino
(totolino)
June 26, 2023, 7:27am
10
clear browser cache or use incognito
2 Likes
Same here,
I have a lot _2 entities which I can not remove. At the same time the original sensor went dead. Nice deadlock.
I created an issue here:
opened 02:13PM - 23 Nov 23 UTC
### The problem
I rely on EspHome for energy monitoring, using about 30 devices… . These report just the state. HACS integration called powercalc converts these to power and energy and creates sensors accordingly.
Since update to HomeAssistant 2023.11 the powercalc sensors are abandoned. New ones are created with suffix _2.
According to the author of powercalc, this is not related to powercalc. More on that here:
https://github.com/bramstroker/homeassistant-powercalc/issues/1919
So far my solution could mean, deleting all original powercalc sensors an recreate from scratch. This will delete almost all my energy statistics data.
How can this problem be tracked down?
### Which version of ESPHome has the issue?
2023-11
### What type of installation are you using?
Home Assistant Add-on
### Which version of Home Assistant has the issue?
2023.11
### What platform are you using?
ESP8266
### Board
not related
### Component causing the issue
not related
### Example YAML snippet
```yaml
ESPHOME:
fan:
- platform: speed
id: kwl_fan
output: gpio_12
name: "KWL Ansteuerung"
POWERCALC:
- entity_id: fan.kwl_ansteuerung
linear:
calibrate:
- 30 -> 10
- 50 -> 23.2
- 76 -> 52
```
### Anything in the logs that might be useful for us?
```txt
Home Assistant logs:
2023-11-19 20:33:23.976 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=fan.kwl_ansteuerung entity_category=None, sensor_name=KWL Ansteuerung power strategy=linear manufacturer= model= unique_id=78:21:84:7C:6B:8C-fan-kwl_ansteuerung)
2023-11-19 20:33:23.976 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor: KWL Ansteuerung energy
2023-11-19 20:33:23.976 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: KWL Ansteuerung energy daily (entity_id=sensor.kwl_ansteuerung_energy_2_daily)
2023-11-19 20:33:23.977 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: KWL Ansteuerung energy weekly (entity_id=sensor.kwl_ansteuerung_energy_2_weekly)
2023-11-19 20:33:23.977 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: KWL Ansteuerung energy monthly (entity_id=sensor.kwl_ansteuerung_energy_2_monthly)
20
2023-11-19 20:33:23.999 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_power_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
2023-11-19 20:33:23.999 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_energy_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
2023-11-19 20:33:24.000 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_energy_daily_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
2023-11-19 20:33:24.001 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_energy_weekly_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
2023-11-19 20:33:24.003 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_energy_monthly_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
20
```
### Additional information

sensor.kwl_ansteuerung_power is not available anymore.
However the new one showed up : sensor.kwl_ansteuerung_power_2
and there:
opened 07:40PM - 19 Nov 23 UTC
bug
### System Health details
## System Information
version | core-2023.11.2…
-- | --
installation_type | Home Assistant OS
dev | false
hassio | true
docker | true
user | root
virtualenv | false
python_version | 3.11.6
os_name | Linux
os_version | 6.1.59
arch | x86_64
timezone | Europe/Berlin
config_dir | /config
<details><summary>Home Assistant Community Store</summary>
GitHub API | ok
-- | --
GitHub Content | ok
GitHub Web | ok
GitHub API Calls Remaining | 5000
Installed Version | 1.33.0
Stage | running
Available Repositories | 1333
Downloaded Repositories | 7
</details>
<details><summary>Home Assistant Cloud</summary>
logged_in | false
-- | --
can_reach_cert_server | ok
can_reach_cloud_auth | ok
can_reach_cloud | ok
</details>
<details><summary>Home Assistant Supervisor</summary>
host_os | Home Assistant OS 11.1
-- | --
update_channel | stable
supervisor_version | supervisor-2023.11.3
agent_version | 1.6.0
docker_version | 24.0.6
disk_total | 30.8 GB
disk_used | 16.5 GB
healthy | true
supported | true
board | ova
supervisor_api | ok
version_api | ok
installed_addons | Samba share (12.1.0), Node-RED (16.0.2), File editor (5.7.0), Terminal & SSH (9.8.1), ESPHome (2023.11.1), Samba Backup (5.0.0), ESPHome (dev) (dev), Let's Encrypt (4.12.9), WireGuard (0.9.0), Mosquitto broker (6.3.1), FiatChamp (3.0.8)
</details>
<details><summary>Dashboards</summary>
dashboards | 2
-- | --
resources | 4
views | 27
mode | storage
</details>
<details><summary>Miele</summary>
component_version | 0.1.17
-- | --
reach_miele_cloud | ok
</details>
<details><summary>Recorder</summary>
oldest_recorder_run | 18. Oktober 2023 um 04:56
-- | --
current_recorder_run | 19. November 2023 um 18:21
estimated_db_size | 2867.97 MiB
database_engine | sqlite
database_version | 3.41.2
</details>
<details><summary>Spotify</summary>
api_endpoint_reachable | ok
-- | --
</details>
### Checklist
- [X] I have read the [FAQ](https://homeassistant-powercalc.readthedocs.io/en/latest/troubleshooting/faq.html) to see if there is a known solution to my problem.
- [X] I have enabled [debug logging](https://homeassistant-powercalc.readthedocs.io/en/latest/troubleshooting/debug-logging.html) for my installation.
- [X] I have filled out the issue template to the best of my ability.
- [X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
- [X] This issue is not a duplicate issue of currently [previous issues](https://github.com/bramstroker/homeassistant-powercalc/issues?q=is%3Aissue+label%3A%22bug%22+)..
### Describe the issue
I have a lot Esphome devices.
This brings it, that at some times the sensor shows up with a suffix "_2".
These can be removed by removing the EspHome Device in the Integrations tab. Delete device, insert again and done. I do that most of the times, otherwise my automations break.
Now have the problem, that powercalc somehow picked up the _2 sensors. Or at least creates some.
The yaml looks lieke:
```
- entity_id: fan.kwl_ansteuerung
linear:
calibrate:
- 30 -> 10
- 50 -> 23.2
- 76 -> 52
```
and was running fine. Since HomeAssistant 2023-11 the sensor accordingliy: `sensor.kwl_ansteuerung_power` is not available anymore.
However the new one showed up : `sensor.kwl_ansteuerung_power_2`

I updated powercalc, rebooted a lot, recreated the EspHome. No matter the powercalc entities keeps working with _2 sonsors while the orignal ones do show up as not available.
How could I fix this?
### Reproduction steps
don't know
### Debug logs
```text
2023-11-19 20:33:23.976 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=fan.kwl_ansteuerung entity_category=None, sensor_name=KWL Ansteuerung power strategy=linear manufacturer= model= unique_id=78:21:84:7C:6B:8C-fan-kwl_ansteuerung)
2023-11-19 20:33:23.976 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor: KWL Ansteuerung energy
2023-11-19 20:33:23.976 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: KWL Ansteuerung energy daily (entity_id=sensor.kwl_ansteuerung_energy_2_daily)
2023-11-19 20:33:23.977 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: KWL Ansteuerung energy weekly (entity_id=sensor.kwl_ansteuerung_energy_2_weekly)
2023-11-19 20:33:23.977 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: KWL Ansteuerung energy monthly (entity_id=sensor.kwl_ansteuerung_energy_2_monthly)
20
2023-11-19 20:33:23.999 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_power_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
2023-11-19 20:33:23.999 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_energy_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
2023-11-19 20:33:24.000 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_energy_daily_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
2023-11-19 20:33:24.001 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_energy_weekly_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
2023-11-19 20:33:24.003 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.kwl_ansteuerung_energy_monthly_2 to device 850580f2f5fd4f1f369a4ebd34c2641f
20
```
### Diagnostics dump or YAML config
_No response_
not too much attention unfortunately. It must have done something to do with the 2023-11 update.
Almost all my energy sensors are dead now.
what a bummer.
Why is every ignoring @totolino reply ? (Removing old entities - #10 by totolino ) its spot on and fixes it.
1 Like
Didn’t remove the entity for me in HA 11.5.