Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming power entity via Integrations page not persistent after restart #257

Closed
samvanh opened this issue Apr 10, 2020 · 29 comments
Closed
Assignees
Labels
bug Something isn't working fixed
Milestone

Comments

@samvanh
Copy link

samvanh commented Apr 10, 2020

When renaming current_consumption entities (Name Override & Entity ID) via Integrations Page, everything seems to save correctly, but after a restart reverts again to standard name & Entity ID

Issue seems to happen to both current_consumption (Wattage) entities of my Shelly EM and not to any other sensors on Shelly EM or Shelly 2.5

After naming:
Screenshot 2020-04-10 at 11 02 30

After HA-core restart:
Screenshot 2020-04-10 at 11 02 40

FYI:
Home Assistant 0.108.1
Supervisor v 214
ShellyForHASS v 0.1.7
All settings via Integrations Page

@chemelli74
Copy link
Contributor

Do you have discovery enabled and/or shelly cloud integrated ?

Simone

@chemelli74 chemelli74 added the support Support issue label Apr 16, 2020
@samvanh
Copy link
Author

samvanh commented Apr 16, 2020

Hi,
-Discovery: enabled
-Shelly Cloud: not connected
I have tested some more and only the current_consumption entity of the shelly EM seems to be affected. Renaming other entities of Shelly EM or 2.5 do persist after HA Core restart. Maybe the problem is in the HA storage rather than your component?

@chemelli74
Copy link
Contributor

I have tested some more and only the current_consumption entity of the shelly EM seems to be affected. Renaming other entities of Shelly EM or 2.5 do persist after HA Core restart. Maybe the problem is in the HA storage rather than your component?

Thank you for investigating.
Unfortunately I don't have yet a Shelly EM to test myself.

Anyway list of fixes/enanchement for 0.1.8 is already closed.
Once released, we'll check this as well.

Simone

@hakana
Copy link
Contributor

hakana commented Apr 16, 2020

ShellyForHass does not support the renaming of entity_id from integration. I need to have a look at that and see if it can be solved.

You can rename the entity_id in config.yaml until fixed.

@vevexus
Copy link

vevexus commented Apr 25, 2020

renaming the entity_id in yaml will affect all entities coming from that device correct?
I have am having the same issue with my power sensors being renamed on two shelly 2.5's.

One of my shelly devices controls couch lights via automation but is actually powering my entertainment center (relay disabled). If I edit the name in yaml it will affect both but I want to specify them separately to sensor level not device level.

@ericvitale
Copy link

I'm having the same issue with the Shelly 1PM. The switch & total_consumption entities stay renamed but the power sensor goes back to default when restarting HA.

@ericvitale
Copy link

This is just a note for anyone new experiencing this issue. Upgrading to 0.1.8 does not fix this issue, it was never expected to. I hope the developers include it in the next release.

This issue is preventing me from adding a bunch of sensors, shelly or not. Not the end of the world in the short term.

@mandelflanders
Copy link

mandelflanders commented May 4, 2020

Using the entity_id: setting in configuration.yaml still will not solve the issue for suffixes.
I have for instance been using a set nomenclature with _power for all power monitoring sensors (since that is the standard for most other integrations, and would like to continue doing so in order to avoid confusion and/or need to join several id:s in the long term data in influxDB/Grafana.

@ericvitale
Copy link

@mandelflanders - Same here. Renaming the power entity each time I restart is getting annoying. I've had to turn off a few automations that are expecting these devices to be working.

@chemelli74 chemelli74 added bug Something isn't working and removed support Support issue labels May 4, 2020
@hakana hakana added this to the 0.1.9 milestone May 7, 2020
@hakana hakana self-assigned this May 8, 2020
@chemelli74
Copy link
Contributor

Please update to latest beta (0.1.9.b1) and recheck.

Simone

@chemelli74 chemelli74 added fixed waiting for feedback Looking for feedback labels May 8, 2020
@ericvitale
Copy link

I'm installed through HACS, but I downloaded the beta release...

https://github.com/StyraHem/ShellyForHASS/releases/download/0.1.9.beta.1/shelly4hass.zip

Extracted into the /custom_components/shelly directory, restarted. Entities changed back to the default names. I updated them again, restarted HA, same result. They changed back to default.

@chemelli74
Copy link
Contributor

I'm installed through HACS, but I downloaded the beta release...

Please install, upgrade and downgrade always via HACS: FAQ5:-Enable-beta-in-HACS

Simone

@ericvitale
Copy link

Yea, as soon as I posted my message I remembered I could do the beta via HACS. Ok, I've restored back to previous version and I can confirm the previous version is functioning. Will update via HACs.

@ericvitale
Copy link

After upgrading to the beta, I changed the entity id and name of the sensor. Restarted, it still got set back to the default. Maybe I'll uninstall the integration and start from scratch.

@ericvitale
Copy link

1 - Uninstalled Integration
2 - Confirmed the "shelly" folder was gone
3 - Restarted Home Assistant
4 - Installed 19.1 beta from HACS
5 - Added the integration.

At that point it started to slowly discover my devices. Doesn't have them all yet, but I can't configure the integration. It doesn't show any text.

shelly

@ericvitale
Copy link

Also, for the devices it did find they didn't retain their entity names or names after restarting HACS. Is there a better way to uninstall? I did it from HACS. Seems like something is cached somewhere.

@hakana
Copy link
Contributor

hakana commented May 8, 2020

@ericvitale Delete the Shelly integration from HA gui and all entries will be removed.

@ericvitale
Copy link

Yes, I just tried that. I deleted the latest install via HACS and deleted the integration via "Integrations" page. When I click add integration without installing via HACS, shelly shows up in the integration list. Should that be there?

@ericvitale
Copy link

Also do you recommend installing 1.8 before upgrading 1.9?

@hakana
Copy link
Contributor

hakana commented May 8, 2020

Yes Shelly should always show up under integrations.

It does not matter if you install 0.1.8 before installing 0.1.9.

@ericvitale
Copy link

Same result, setup screens don't have any text.

@ericvitale
Copy link

Uninstalled, went back to 0.1.8, same thing. Blank text on setup screens.

@ericvitale
Copy link

I took a backup of my shelly folder before all this started (or I started it). I noticed that the new shelly install does not have a pycache folder. Not sure if that matters or not.

@hakana
Copy link
Contributor

hakana commented May 8, 2020

Do you have the translations folder including en.json? It is strange the pycache is not created. Check permissions on files and folders.

@ericvitale
Copy link

en.json exists. It was the first thing I checked. I also restored the old shelly folder, same issue.

Permissions look like they did before. Here is a screenshot. Also, going to try restarting the whole machine. The other thing that is weird is that it hasn't discovered all of my shelly devices yet. And for the couple it did find, some of them it "remembered" the device names, not the entities and others it didn't. See the other image. I didn't have to rename the Garage Door and Miner08. But the other shelly should should Miner03.

devices

files

@ericvitale
Copy link

Restarting didn't help.

@ericvitale
Copy link

ericvitale commented May 8, 2020

TLDR; Working now

Progress...
1 - Uninstalled Integration
2 - Removed integration from "integrations" page.
3 - Confirmed the "shelly" folder was gone
4 - Restarted Server
5 - Installed via HACs (1.8)
6 - Added via "Integrations" page.

---Text on the setup page, yay!---

7 - Setup ran fine.

---Still missing a device---

8 - Upgraded to 1.9 via HACs
9 - Restarted Home Assistant
10 - Renamed a power entity
11 - Restarted Home Assistant

--- Entity rename worked, yay!
--- Found the rest of the devices, yay!

12 - Renaming the rest now

--- I hope for the last time!!!

@hakana
Copy link
Contributor

hakana commented May 8, 2020

Im glad it working for you now!

@ericvitale
Copy link

Thank you for making the changes.

@chemelli74 chemelli74 removed the waiting for feedback Looking for feedback label May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

6 participants