Update ZHA device websocket API types (#24087)

* Expose routing status from ZHA websocket API

* Clean up types a little bit

* Lint
This commit is contained in:
puddly 2025-03-11 09:00:12 -04:00 committed by GitHub
parent 4ef3a25479
commit d0545fe827
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,8 +11,8 @@ export interface ZHADevice {
available: boolean;
name: string;
ieee: string;
nwk: string;
lqi: string;
nwk: number;
lqi: number;
rssi: string;
last_seen: string;
manufacturer: string;
@ -29,6 +29,7 @@ export interface ZHADevice {
active_coordinator: boolean;
signature: any;
neighbors: Neighbor[];
routes: Route[];
pairing_status?: string;
}
@ -40,6 +41,23 @@ export interface Neighbor {
relationship: string;
}
export interface Route {
dest_nwk: string;
route_status: RouteStatus;
memory_constrained: boolean;
many_to_one: boolean;
route_record_required: boolean;
next_hop: string;
}
export enum RouteStatus {
Active = "Active",
DiscoveryUnderway = "Discovery_Underway",
DiscoveryFailed = "Discovery_Failed",
Inactive = "Inactive",
ValidationUnderway = "Validation_Underway",
}
export interface ZHADeviceEndpoint {
device: ZHADevice;
endpoint_id: number;