tomaae / homeassistant-truenas

TrueNAS integration for Home Assistant
Apache License 2.0
194 stars 19 forks source link

[Feature] Reconfigure existing integration entries #116

Closed MrTastyBiscuits closed 11 months ago

MrTastyBiscuits commented 1 year ago

Is your feature request related to a problem? Please describe.

I would like to be able to change the settings of an existing integration entry without deleting it (change of ip/hostname of the server, ssl settings).

Describe the solution you'd like

As with many other integrations, it would be nice to have a "Configure" button next to each integration entry on the integration page. When pressed, it would open the same dialog box as during the initial configuration and allow each setting of the existing entry to be modified.

Describe alternatives you've considered

  1. Modifying config files manually: I have looked around quickly in the config files but wasn't able to find the one that defines these settings. Maybe you can point me in the right direction, I'm not so well versed in HA config files location…
  2. Deleting and recreating the entry: Unfortunately, I think that this may result in a loss of all the history of the current sensors (i.e. it would create new sensors and not link them back to the previous ones). This might not be the actual behaviour of the integration though, I'm unsure. I would only consider doing this as a last resort.

Additional context

I hope that my issue is described clearly enough and that I haven't missed something that's already there… Many thanks for your work on this integration!

tomaae commented 1 year ago

hmm, never noticed such feature. can you give me some examples?

MrTastyBiscuits commented 1 year ago

Granted, this is not such a widely available feature in custom integrations, but some do support it. These are some examples, only the first one and HACS are custom integrations:

Here is a stack of 2 screenshots from the Adaptive Lighting integration (also available through HACS) that shows how it looks:

Screenshot out
tomaae commented 1 year ago

ah I see, those are just integration options, not connection details and such. truenas integration does not have any options, so its not available.

github-actions[bot] commented 12 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

MrTastyBiscuits commented 12 months ago

ah I see, those are just integration options, not connection details and such. truenas integration does not have any options, so its not available.

Got it. So how could I change the hostname of my server (same server, different hostname, going from IP address to FQDN) without having to delete the integration and add it back to HA ? My goal is to keep all entities as they are now, I wouldn't want their id to change. Thanks for the help !

github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] commented 11 months ago

This issue was closed because it has been stalled for 5 days with no activity.

tomaae commented 11 months ago

as far as I know, you cannot change entries in data.entry.data, only data.entry.options. so you will have to remove and readd. if you remove the integration, restart ha and make sure all leftover entities are deleted, you should get same names as long as you name the entry in same way.