I am desperately trying to find a way to display a card depending on whether a user accesses the UI locally or remotely (through NabuCasa cloud).
The concept is that there are a bunch of cameras on a managed PoE switch that can disabled (and enabled) via HA for privacy reasons. However it should be impossible to turn them off or on remotely. This should only be possible if the user is in the local WiFi.
I have experimented with combinations of device trackers and user specific visibilities, but since I have 5 active users I would have to generate cards for every possible combination of presences of these 5 users, giving me 32 cards with different configurations. This is obviously impractical, especially if I ever have to add or remove a user.
Is there really no way to have a “if local” condition for card visibility? This seems like such an obvious thing, but I can’t find any mention of this anywhere!
You can use Conditional card - Home Assistant
And as the condition the entity of the user with the state as home and user (so both home and the user logged in need to be true)
Other then that i do not think you can create a dynamic card for each user, you will have to create a condition card for each user.
I tried something like that - but the “home” state of users seems to be extremely unreliable. Somehow it updates extremely slow, I assume because it depends on background updating the end user device’s GPS instead of checking whether the user is connected to the home network or not?