Fix zeroconf sorting (#24068)
This commit is contained in:
parent
03253f4598
commit
66af4bd011
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
"""Generate zeroconf file."""
|
||||
from collections import OrderedDict
|
||||
import json
|
||||
from typing import Dict
|
||||
|
||||
|
@ -37,7 +38,10 @@ def generate_and_validate(integrations: Dict[str, Integration]):
|
|||
|
||||
service_type_dict[service_type].append(domain)
|
||||
|
||||
return BASE.format(json.dumps(service_type_dict, indent=4))
|
||||
data = OrderedDict((key, service_type_dict[key])
|
||||
for key in sorted(service_type_dict))
|
||||
|
||||
return BASE.format(json.dumps(data, indent=4))
|
||||
|
||||
|
||||
def validate(integrations: Dict[str, Integration], config: Config):
|
||||
|
|
Loading…
Add table
Reference in a new issue