Add user group selector. Fix #13

This commit is contained in:
2019-12-10 21:37:53 +01:00
parent 5495c5ba8c
commit ac934da820
3 changed files with 7 additions and 2 deletions

View File

@@ -33,6 +33,8 @@ class StateSwitch extends LitElement {
case "user":
newstate = this.hass && this.hass.user && this.hass.user.name || undefined;
break;
case "group":
newstate = (this.hass && this.hass.user && this.hass.user.is_admin) ? "admin" : "user";
case "deviceID":
case "browser":
newstate = deviceID;