gerard33
(Gerard 🇳🇱)
December 31, 2018, 7:16pm
154
There is a way to do that. There was a post a while ago where it was explained (maybe on Github). Will try to find that and let you know.
Would be great if this can be added
Edit
@mayker will this work?
You can use auth/current_user websocket command to get current login user.
Or $('home-assistant').hass.user if you are in the front end
Edit 2
Here it is already used in a custom card.
state-switch
I like the conditional card and its ability to dynamically change the interface a bit, but if you want to switch between two different cards, you need to add two conditional cards… And if you want even more it quickly grows.
So I made state-switch which allows you to switch in a card based on a dictionary of entity states.
- type: custom:state-switch
entity: device_tracker.my_phone
states:
home:
[definition of one card]
work:
[definition of another card]
…
1 Like