mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Ask for IoT class during scaffold (#49647)
Co-authored-by: Milan Meulemans <milan.meulemans@live.be> Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
import json
|
||||
|
||||
from homeassistant.util import slugify
|
||||
from script.hassfest.manifest import SUPPORTED_IOT_CLASSES
|
||||
|
||||
from .const import COMPONENT_DIR
|
||||
from .error import ExitApp
|
||||
@ -46,6 +47,7 @@ def gather_info(arguments) -> Info:
|
||||
"codeowner": "@developer",
|
||||
"requirement": "aiodevelop==1.2.3",
|
||||
"oauth2": True,
|
||||
"iot_class": "local_polling",
|
||||
}
|
||||
)
|
||||
else:
|
||||
@ -86,6 +88,22 @@ def gather_new_integration(determine_auth: bool) -> Info:
|
||||
]
|
||||
],
|
||||
},
|
||||
"iot_class": {
|
||||
"prompt": (
|
||||
f"""How will your integration gather data?
|
||||
|
||||
Valid values are {', '.join(SUPPORTED_IOT_CLASSES)}
|
||||
|
||||
More info @ https://developers.home-assistant.io/docs/creating_integration_manifest#iot-class
|
||||
"""
|
||||
),
|
||||
"validators": [
|
||||
[
|
||||
f"You need to pick one of {', '.join(SUPPORTED_IOT_CLASSES)}",
|
||||
lambda value: value in SUPPORTED_IOT_CLASSES,
|
||||
]
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
if determine_auth:
|
||||
|
Reference in New Issue
Block a user