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

[Bug] Container entity environment attribute shows incorrect endpoint name #23

Open
mash2k3 opened this issue Oct 27, 2023 · 1 comment
Labels
bug Something isn't working planned To be implemented in future release

Comments

@mash2k3
Copy link

mash2k3 commented Oct 27, 2023

I have 5 environments, i connect 4 of them using portainer agent to portainer installed on my main environment.
So 4 portainer agents installs and 1 portainer install.
I connected the portainer install to the integration.
To make it easy to explain the issue lets name my 5 environments a b c d e
The integration created 2 devices and named them Portainer Endpoints and Portainer a
It added all the container entities under Portainer a which is not a big deal for me.
But inside every container entity there is a attribute called environment that is set to e on all of them.
That is the issue i wanted to point out because i have the same container running on more than 1 endpoint and i can not differentiate.

How to reproduce the issue

On initial install

Expected behavior

Each container entity to have the correct environment name

Screenshots

image

Software versions

  • Home Assistant version: 2023.10.5
  • Portainer integration version: v1.0.2
  • Portainer software version: 2.19.1

Diagnostics data

config_entry-portainer-e16601bca67a2762bd40d71edfa86a23.json.txt

@mash2k3 mash2k3 added the bug Something isn't working label Oct 27, 2023
@mash2k3 mash2k3 changed the title [Bug] [Bug] Container entity environment attribute shows incorrect endpoint name Oct 27, 2023
@tomaae tomaae added the planned To be implemented in future release label Nov 4, 2023
@fanaticDavid
Copy link

fanaticDavid commented Aug 22, 2024

I just discovered this really cool integration, but I can already confirm this bug. I have my Portainer-CE instance running on an Intel NUC, and I have 2 Portainer agents on my NAS and a Raspberry Pi. Every single container sensor has my NAS listed as its environment, which is incorrect. Sadly, #35 was auto-closed after going stale twice.

Update: being impatient as I am (😇), I manually applied the changes made to the 2 files in #35 and restarted HA. The changes seem to be working just fine:

  • Every container entity now shows the correct environment
  • Instead of having a single device for all container entities, every endpoint now has its own device with the appropriate container entities linked to it

As a last step, I removed the integration and added it back. I did this to get rid of the empty device that previously held all container entities and to update the entity_id of each container entity with the endpoint name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working planned To be implemented in future release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants