Add Denon brand (#79230)

This commit is contained in:
Paulus Schoutsen 2022-09-28 17:09:53 -04:00 committed by GitHub
parent b43e19a0c1
commit e3ed4eeb76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 17 deletions

View file

@ -0,0 +1,5 @@
{
"domain": "denon",
"name": "Denon",
"integrations": ["denon", "denonavr", "heos"]
}

View file

@ -805,14 +805,24 @@
"iot_class": "calculated" "iot_class": "calculated"
}, },
"denon": { "denon": {
"config_flow": false, "name": "Denon",
"iot_class": "local_polling", "integrations": {
"name": "Denon Network Receivers" "denon": {
}, "config_flow": false,
"denonavr": { "iot_class": "local_polling",
"config_flow": true, "name": "Denon Network Receivers"
"iot_class": "local_polling", },
"name": "Denon AVR Network Receivers" "denonavr": {
"config_flow": true,
"iot_class": "local_polling",
"name": "Denon AVR Network Receivers"
},
"heos": {
"config_flow": true,
"iot_class": "local_push",
"name": "Denon HEOS"
}
}
}, },
"deutsche_bahn": { "deutsche_bahn": {
"config_flow": false, "config_flow": false,
@ -1770,11 +1780,6 @@
"iot_class": "local_polling", "iot_class": "local_polling",
"name": "Heatmiser" "name": "Heatmiser"
}, },
"heos": {
"config_flow": true,
"iot_class": "local_push",
"name": "Denon HEOS"
},
"here_travel_time": { "here_travel_time": {
"config_flow": true, "config_flow": true,
"iot_class": "cloud_polling", "iot_class": "cloud_polling",

View file

@ -38,7 +38,7 @@ def _validate_brand(
if not brand.integrations and not brand.iot_standards: if not brand.integrations and not brand.iot_standards:
config.add_error( config.add_error(
"brand", "brand",
f"Invalid brand file {brand.path.name}: At least one of integrations or " f"{brand.path.name}: At least one of integrations or "
"iot_standards must be non-empty", "iot_standards must be non-empty",
) )
@ -47,8 +47,7 @@ def _validate_brand(
if sub_integration not in integrations: if sub_integration not in integrations:
config.add_error( config.add_error(
"brand", "brand",
f"Invalid brand file {brand.path.name}: Can't add non core domain " f"{brand.path.name}: References unknown integration {sub_integration}",
f"'{sub_integration}' to 'integrations'",
) )
if brand.domain in integrations and ( if brand.domain in integrations and (
@ -56,7 +55,7 @@ def _validate_brand(
): ):
config.add_error( config.add_error(
"brand", "brand",
f"Invalid brand file {brand.path.name}: Brand '{brand.brand['domain']}' " f"{brand.path.name}: Brand '{brand.brand['domain']}' "
f"is an integration but is missing in the brand's 'integrations' list'", f"is an integration but is missing in the brand's 'integrations' list'",
) )