189 files

This commit is contained in:
Home Assistant Version Control committed 2026-09-08 18:05:32 +00:00
1 parent 79fefc0a7c
commit 303886f212
189 files changed
+21402 -3514

No files matched your search

@@ -4,6 +4,7 @@
*/
import type { HomeAssistant, HAUser } from "./types";
import { personOf, type PersonDisplay } from "./helpers/person";
export class UserService {
private hass: HomeAssistant;
@@ -92,6 +93,11 @@ export class UserService {
/**
* Get full user object by ID (from cache)
*/
/** Avatar + name for a user id (null until users are loaded / unknown id). */
getPerson(userId: string | null): PersonDisplay | null {
return personOf(this.getUser(userId));
}
getUser(userId: string | null): HAUser | null {
if (!userId || !this.usersCache) {
return null;