diff --git a/custom_components/portainer/coordinator.py b/custom_components/portainer/coordinator.py index c2bb95d..7475936 100644 --- a/custom_components/portainer/coordinator.py +++ b/custom_components/portainer/coordinator.py @@ -171,8 +171,10 @@ def get_containers(self) -> None: {"name": "EndpointId", "default": eid}, ], ) - for cid in self.data["containers"]: + self.data["containers"][cid]["Environment"] = self.data["endpoints"][ + eid + ]["Name"] self.data["containers"][cid]["Name"] = self.data["containers"][cid][ "Names" ][0][1:] diff --git a/custom_components/portainer/sensor_types.py b/custom_components/portainer/sensor_types.py index 6a88c65..4fb1a32 100644 --- a/custom_components/portainer/sensor_types.py +++ b/custom_components/portainer/sensor_types.py @@ -35,6 +35,7 @@ "Compose_Stack", "Compose_Service", "Compose_Version", + "Environment", ]