Hass-more-info custom card (JS)

Hi everyone,

I’ve done a custon card with chatGPT to display power of every zigbee plug.
Now i’d like to get a link with the power information to display popin stat.
ChatGpt gave me this part of code but nothing work with fireevent.
Do you have any idea to do this ?
Thanks a lot.

 powerDiv.style.transform = "translateX(-50%)";
      powerDiv.style.cursor = "pointer"; // Ajoute un indicateur de clic
      powerDiv.addEventListener("click", () => {
        console.log("Hass object:", hass);
        if (hass) {
          hass.fireEvent("hass-more-info", { entityId: powerId });
        }
      });