Hi there!
Is it possible to change the source of an iFrame card dynamically? And more specifically, is it possible to do so based on whether Home Assistant is visited through HTTP or HTTPS?
Context: I run a Jellyfin mediaserver next to Home Assistant. This media server is available both locally (HTTP) and via the internet (HTTPS). I manage this all using the awesome Nginx Proxy Manager add-on.
I integrate the Jellyfin interface in my HA instance using an iFrame card, and use the external Jellyfin URL as iFrame source (which works for both local and external HA access). The drawback of this approach is that internet is required to properly render the iFrame. So what I’d like to do is the following:
- When I access HA locally → use the internal IP of my media server as the iFrame’s source.
- When I access HA over the internet → use the domain name that points to my media server.
Is this possible? Any help is appreciated, thanks for reading!