Repository navigation
fix(bridge): keep refresh controls and card type across periodic resync (1.8.74) - #117
Merged
Merged
Conversation
…nc (1.8.74) - Applying the Advanced command catalog dropped every advanced: control and re-added only switch toggles, so the refresh buttons the resync snapshot had just rebuilt vanished after every reconciliation. The catalog now replaces only the toggles it owns. - An Advanced row's deviceType/type/deviceTypeId (often OCF, ZIGBEE) overwrote the device card's type (washer, dryer), flipping read-only appliance classification. Those fields now only fill a missing type; deviceTypeName still refines it. An existing presentation is kept. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…test Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
1.8.73에서 통합의 실행 중 삭제는 막았지만, Bridge의 30분 주기 재조정(
state_sync_watchdog→StateReconciliationCoordinator) 때마다 인벤토리가 흔들리는 원인은 남아 있었습니다.#applyAdvancedDeviceSnapshot(authoritative)이advanced:refresh:*버튼 컨트롤을 만듭니다. 곧이어 비동기buildAdvancedCommandCatalog→#applyAdvancedCommandCatalog가advanced:로 시작하는 컨트롤을 전부 지우고 스위치 토글만 다시 넣습니다. 그래서 새로고침 버튼이 재조정마다 사라집니다. 실제 설치본에서는 새로고침 버튼 엔티티 138개가 재조정 때 지워졌다가 다음 재조정에서야 복원되는 것을 확인했습니다.deviceType·type·deviceTypeId에는 통신 방식 값(테스트 데이터 기준ZIGBEE, 운영에서는OCF로 추정)이 들어옵니다. 이 값이 기기 카드의deviceTypeData.type(washer 등)을 덮어썼습니다. 운영에서는 재조정 직후 건조기·세탁기·식기세척기 전원 binary_sensor가 읽기 전용 가전이 아닌 것으로 판정돼 지워졌습니다. 실제 Advanced 행 값을 직접 보지는 않았습니다.수정
advanced:refresh:*를 남기고, 자신이 만드는 스위치 토글만 교체합니다.deviceTypeName(의미 있는 종류)은 지금처럼 덮어씁니다.deviceType·type·deviceTypeId는 종류가 비어 있을 때만 채웁니다. presentation은 기존 값이 있으면 유지합니다.테스트
device-store.test.ts): 카탈로그 반영 후에도 새로고침 버튼이 남는지, Advanced 행의deviceType: "OCF"가 기기 카드의washer를 덮어쓰지 않는지 확인합니다. 둘 다 수정 전 실패(OCF재현), 수정 후 통과.merges same-origin advanced device metadata(deviceTypeName이 종류를 덮어씀)는 유지됩니다.tar관련 2건만 로컬 실패합니다(CI 통과 이력 있음).남은 것
재조정 사이에 기기 4개가 약 40분간 인벤토리에서 빠졌던 현상은 Bridge 코드에서 경로를 찾지 못했습니다. 이 PR로는 해결되지 않습니다.
🤖 Generated with Claude Code