@riddix/hamh 2.1.0-alpha.525 → 2.1.0-alpha.526

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -148516,6 +148516,15 @@ function logsApi(_logger) {
148516
148516
  }
148517
148517
 
148518
148518
  // src/api/diagnostic-api.ts
148519
+ function endpointTreeNode(ep) {
148520
+ return {
148521
+ id: ep.id,
148522
+ endpoint: ep.number,
148523
+ deviceType: `0x${ep.type.deviceType.toString(16).padStart(4, "0")}`,
148524
+ deviceTypeName: ep.type.name,
148525
+ parts: [...ep.parts].map((p) => endpointTreeNode(p))
148526
+ };
148527
+ }
148519
148528
  function detectEnvironment() {
148520
148529
  if (process.env.SUPERVISOR_TOKEN || process.env.HASSIO_TOKEN) {
148521
148530
  return "Home Assistant Add-on";
@@ -148590,7 +148599,14 @@ function diagnosticApi(bridgeService, haClient, haRegistry, version, startTime)
148590
148599
  failedEntities: failedEntities.map((fe) => ({
148591
148600
  entityId: anonymize ? anonymizeEntityId(fe.entityId) : fe.entityId,
148592
148601
  reason: fe.reason
148593
- }))
148602
+ })),
148603
+ endpointTree: (() => {
148604
+ try {
148605
+ return endpointTreeNode(b.server);
148606
+ } catch {
148607
+ return void 0;
148608
+ }
148609
+ })()
148594
148610
  };
148595
148611
  });
148596
148612
  const recentLogs = logBuffer.entries.slice(-logLimit).map((entry) => ({