본문 바로가기
Homeassistant/Developer Docs

[Homeassistant] 커스텀 컴포넌트에 icon과 logo 등록하기

by miumida 2020. 10. 8.

 

"Logos for custom intergrations" 라는 제목으로 개발자 문서에 블로그에 Franck형이 포스팅을 했다.

구글 번역기와 파파고의 힘을 빌리고, 문장만 살짝씩 다듬어봤다.


최근, Home Assistant는 통합구성요소를 위해 이미지 및 아이콘을 frontend에 지원하기 시작했습니다.
그것들은 놀라워 보이고 Home Assistant의 UI에 실제로 몇가지 색을 제공해 줍니다.

최근에 커스텀 통합구성요소에 이미지를 추가하는 방법에 대해 많은 질문을 받았습니다.
오늘부터 가능합니다!

커스텀 통합구성요소를 만들었나요?
Home Assistant frontend에 당신의 통합구성요소의 로고와 아이콘이 표시되기를 원하시나요?
그렇다면 GitHub Brands Repository로 이동하여 추가해 보세요!

 

PS :

Python wheels repository에 커스텀 통합구성요소를 추가할 수도 있다는 것을 알고 계신가요?
Home Assistant에 신속하게 당신의 커스텀 통합구성요소를 설치할 수 있습니다!


커스텀 컴포넌트에 icon과 logo를 등록해 보자.

간략하게 말하면 커스텀 컴포넌트도 icon과 logo를 만들어서 home-assistant/brands 깃허브에 Pull requests 하면 검토 후, 반영을 해준다.

요청하고 나서 양식에 맞지 않거나 하면 피드백을 주기때문에 확인해서 다시 요청하면 된다.

 

 

home-assistant/brands

🎨 Brands for Home Assistant. Contribute to home-assistant/brands development by creating an account on GitHub.

github.com

1. home-assistant/brands github fork

home-assistant/brands 깃허브를 fork한다.fork가 완료되면 내 repository에 짠하고 복사되어 있는 것이 확인된다.

 

2. custom_integrations 경로에 logo와 icon 파일 업로드 또는 추가

brands / custom_integrations 경로에 커스텀 컴포넌트 이름의 폴더로 logo와 icon파일을 업로드 또는 생성해준다.

brands / custom_integrations / naver_weather 경로에 logo.png, icon.png를 잘 넣어주면 된다.

brands
  ㄴcustom_integrations
       ㄴ naver_weather
             ㄴ logo.png
             ㄴ icon.png

 

3. 업로드 또는 추가된 파일 확인

업로드 또는 추가가 완료되었으면, brands / custom_integrations / naver_weather 경로에 파일이 잘 올라갔는지 확인한다.

 

4. Pull requests

업로드 또는 추가한 파일에 이상이 없으면, Pull requests 메뉴에 New pull requests를 눌러준다.

 

5. comparing changes

변경된 내용을 확인하고 Create pull requests를 눌러준다.

주의할 점은 필요한 logo, icon 파일만 딱 대상으로 올라오는지 확인한다.

변경해서 반영할 custom_integrations 외에 항목이 있으면, 코멘트로 대상파일만 올리라고 해준다.

 

6. Open a pull request

Open a pull request 에서 필요한 항목에 체크 표시를 해줘야한다.

컬러링 되어있는 항목정도만 [] 안쪽에 X표시를 해주면 된다.

예) [X] Add a new logo or icon for a custom integration (custom component)

필요한 항목을 다 체크했으면, Create pull request를 눌러준다.

Proposed change

Type of change

  •  Add a new logo or icon for a new core integration
  •  Add a missing icon or logo for an existing core integration
  •  Add a new logo or icon for a custom integration (custom component)
  •  Replace an existing icon or logo with a higher quality version
  •  Removing an icon or logo

Additional information

  • This PR fixes or closes issue: fixes #
  • Link to code base pull request:
  • Link to documentation pull request:
  • Link to integration documentation on our website:

Checklist

  •  The added/replaced image(s) are PNG
  •  Icon image size is 256x256px (icon.png)
  •  hDPI icon image size is 512x512px for (icon@2x.png)
  •  Logo image size has min 128px, but max 256px, on the shortest side (logo.png)
  •  hDPI logo image size has min 256px, but max 512px, on the shortest side (logo@2x.png)

 

 

7. Pull requests 완료!

Open 상태로 표시되고 Pull requests 된게 확인된다.

 

8. Contributor License Agreement

지난번에는 Pull requests 할때는 없었던 부분인되 추가되었다.

here을 눌러서 들어가게 되면 CLA Signature 페이지가 연결되고, 간단한 내용만 입력해주고 Sign CLA를 눌러준다.CLA 관련된 내용은 아래에 링크로 내용 확인하면 된다.

 

 

Contributor License Agreement

The Code of Conduct for Home Assistant projects.

www.home-assistant.io

 

9. 기다리기

이상없이 잘 merge되기를 기다리면 끝!

이상이 있는 경우, 코멘트를 달아주니 그때 확인해보면 된다.

 

 

10. 주의사항

어정쩡하게 배경으 투명과 화이트로 했더니, 이미지 믹스되어있다고 그러면서 merge시켜주지 않고 커멘트가 왔다.

그래서 일단 화이트로 배경색을 바꿨다. 이제 merge시켜줄려나...ㅠ


네이버 날씨와 카카오 TTS는 brands에 Pull requests 해서 Merge되어 반영되어 있는 상태다.

icon과 logo 샘플은 아래와 같다.

 

아기나무집님의 HA-Connector도 작업했는데, 아직 brands에 요청은 하지않은 상태다.

[ Home Assistant Developer Docs ]

 

Logos for custom integrations | Home Assistant Developer Docs

Recently, Home Assistant started to support images & icons for integrations

developers.home-assistant.io

 

댓글