Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
HomeAssistant
Core
Commits
281a9f04
Unverified
Commit
281a9f04
authored
7 months ago
by
Joost Lekkerkerker
Committed by
GitHub
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Check minimum amount of integrations for a brand (#124310)
parent
1d35c745
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
script/hassfest/brand.py
+8
-2
8 additions, 2 deletions
script/hassfest/brand.py
with
8 additions
and
2 deletions
script/hassfest/brand.py
+
8
−
2
View file @
281a9f04
...
...
@@ -18,6 +18,8 @@ BRAND_SCHEMA = vol.Schema(
}
)
BRAND_EXCEPTIONS
=
[
"
u_tec
"
]
def
_validate_brand
(
brand
:
Brand
,
integrations
:
dict
[
str
,
Integration
],
config
:
Config
...
...
@@ -38,10 +40,14 @@ def _validate_brand(
f
"
Domain
'
{
brand
.
domain
}
'
does not match file name
{
brand
.
path
.
name
}
"
,
)
if
not
brand
.
integrations
and
not
brand
.
iot_standards
:
if
(
len
(
brand
.
integrations
)
<
2
and
not
brand
.
iot_standards
and
brand
.
domain
not
in
BRAND_EXCEPTIONS
):
config
.
add_error
(
"
brand
"
,
f
"
{
brand
.
path
.
name
}
: At least
one of
integrations or
"
f
"
{
brand
.
path
.
name
}
: At least
two
integrations or
"
"
iot_standards must be non-empty
"
,
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment