본문 바로가기
Homeassistant/Developer Docs

[Homeassistant] Integration Configuration Options

by miumida 2021. 1. 14.

끄적끄적

 

커스텀 컴포넌트를 통합구성요소로 등록할 수 있게 하기 위해서는 config_flow를 추가해주는 작업이 필요하다.

요즘 추세는 yaml을 수정하는 쪽이 아니라 UI에서 앱을 설치하 듯이 추가하는 방향으로 HA가 흘러가고 있는 것 같다.

 

그리고 중요한건 국내는 자료가 너무 없어서 해외 소스를 한참 멍하니 보면서 삽질을 하는 방법 밖에는 없다.공식 개발자 문서에도 친절하게 설명이 나와있지도 않기도 하고,,,

 

기본적으로 Integration Configuration Options을 사용하기 위해서는 Integration Configuration이 선행되어야만 한다.

 

@staticmethod
@callback
def async_get_options_flow(config_entry):
    return OptionsFlowHandler()

 

 

Integration Configuration Options | Home Assistant Developer Docs

An integration that is configured via a config entry can expose options to the user to allow tweaking behavior of the integration, like which devices or locations should be integrated.

developers.home-assistant.io

 

댓글