Skip to content

Commit

Permalink
Fix zeroconf sorting (#24068)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed May 23, 2019
1 parent 03253f4 commit 66af4bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion script/hassfest/zeroconf.py
@@ -1,4 +1,5 @@
"""Generate zeroconf file."""
from collections import OrderedDict
import json
from typing import Dict

Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 66af4bd

Please sign in to comment.