Add set default for domain for scaffold script (#76628)
* Add set default for domain for scaffold script * Add default domain for config_flow_discovery integration * Extend comment explaining usage
This commit is contained in:
parent
7be6d6eba2
commit
50a1de9f73
2 changed files with 10 additions and 2 deletions
|
@ -14,7 +14,11 @@ PLATFORMS: list[Platform] = [Platform.LIGHT]
|
|||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Set up NEW_NAME from a config entry."""
|
||||
# TODO Store an API object for your platforms to access
|
||||
|
||||
hass.data.setdefault(DOMAIN, {})
|
||||
# TODO 1. Create API instance
|
||||
# TODO 2. Validate the API connection (and authentication)
|
||||
# TODO 3. Store an API object for your platforms to access
|
||||
# hass.data[DOMAIN][entry.entry_id] = MyApi(...)
|
||||
|
||||
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
|
||||
|
|
|
@ -14,7 +14,11 @@ PLATFORMS: list[Platform] = [Platform.BINARY_SENSOR]
|
|||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Set up NEW_NAME from a config entry."""
|
||||
# TODO Store an API object for your platforms to access
|
||||
|
||||
hass.data.setdefault(DOMAIN, {})
|
||||
# TODO 1. Create API instance
|
||||
# TODO 2. Validate the API connection (and authentication)
|
||||
# TODO 3. Store an API object for your platforms to access
|
||||
# hass.data[DOMAIN][entry.entry_id] = MyApi(...)
|
||||
|
||||
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue