자동화 편의를 위한 엔티티 분리, 가변 업데이트 주기 기능 추가, 오프셋 추가#3
Open
hyeok-yoo wants to merge 1 commit into
Open
Conversation
버스 정보 엔티티 분리: 기존 문자열 센서를 대신하여 남은 시간(분), 도착 예정 시간(타임스탬프), 남은 정류장 수의 3가지 개별 엔티티를 생성합니다. 도착 시간 오프셋(Offset) 기능: API 정보와 실제 도착 시간의 오차를 보정하기 위해 설정한 시간(분)만큼 미리 도착 정보를 알려주는 기능을 추가했습니다. 커스텀 업데이트 주기 지원: 출근 시간 등 정확한 정보가 필요한 특정 시간대를 최대 3개까지 지정하여 업데이트 간격(예: 10초)을 다르게 설정할 수 있습니다. 설정 UI 개선: 초기 설정 및 옵션 화면에서 오프셋과 커스텀 주기를 입력할 수 있도록 추가했습니다
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.
안녕하세요! 서울 버스 컴포넌트를 유용하게 사용하던 중, 사용자 입장에서 자동화 작성을 더 편리하게 하고 특정 시간대에 더 정밀한 정보를 얻을 수 있도록 기능을 개선하여 PR을 보냅니다.
변경 및 개선 사항
엔티티 구조 개편 (자동화 최적화)
기존의 단일 텍스트 센서 방식에서 벗어나, 데이터를 남은 시간(분), 도착 예정 시간(타임스탬프), 남은 정류장 수의 3가지 개별 엔티티로 분리했습니다.
이를 통해 사용자가 별도의 파싱 없이도 "남은 시간이 3분 미만일 때"와 같은 자동화 조건을 매우 쉽게 작성할 수 있습니다.
가변 업데이트 주기(Dynamic Update Interval) 지원
등교나 출근 시간처럼 정밀한 확인이 필요한 특정 시간대를 최대 3개까지 설정하여, 해당 범위 내에서는 업데이트 주기를 더 짧게(예: 10초) 가져갈 수 있는 기능을 추가했습니다. 그 외의 시간에는 기본 주기(60초)를 유지하여 API 부하를 효율적으로 관리합니다.
도착 시간 오프셋(Offset) 설정 추가
버스를 놓치지 않도록 실제 도착 시간보다 조금 더 여유 있게(기본 1분 등) 안내받을 수 있도록 오프셋 기능을 추가했습니다.
UI 개선
위 기능들을 통합구성요소의 '구성(Options)' 메뉴에서 사용자가 직접 제어할 수 있도록 스키마를 업데이트했습니다.
기존 코드를 존중하면서도 HA의 표준 센서 클래스(Timestamp, Duration 등)를 최대한 활용하도록 수정했습니다. 검토 부탁드립니다. 감사합니다!