Hey,
it would be great, if you can add something like a currentUser variable, you i can include it into the rules.
-
Variable currentUser
-
@thymian can you elaborate currentUser? do you mean user connected to the UI?
Pimatic, smart home made by smart folks, for the rest of us!
-
yes, thats exactly what i meant: the current User of the UI of pimatic
i want to use it with some rules like
IF <Button> is pressed and cUser = "joe" then DO..
-
@thymian could be useful I voted for the feature!
Pimatic, smart home made by smart folks, for the rest of us!
-
@thymian For clarification, it should be noted different users may be logged in at the same time. So, currentUser actually needs to be a set, e.g.
WHEN <Button> is pressed and currentUsers contains "joe" THEN ...
The problem is, however, the set datatype and the “contains” operation do nopt yet exist and need to be implemented.
Anothering thing to think about about how built-in variables should be implemented. I can imagine this being part of (pseudo) device, say it is named “#pimatic”.
WHEN <Button> is pressed and currentUsers of #pimatic contains "joe" THEN ...
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
I would rather suggest to create seperate button devices with different visibilities for users.
If the button does different things based on the user it makes more sense to me if it is a different button and not some button with “magic” behind it which is not obvious.
For example assume that I like to watch TV with lights off but my girlfriend likes to watch with lights on.
I would have two buttons “TV indirect lights” and “TV no lights”.
Or are there other usecases?
-
This feature request as is is not implementable at present
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law