From 66af4bd0113957891293faf06000f7bcba553883 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 23 May 2019 14:41:57 -0700 Subject: [PATCH] Fix zeroconf sorting (#24068) --- script/hassfest/zeroconf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/hassfest/zeroconf.py b/script/hassfest/zeroconf.py index 468d2741dbd..26e302c864c 100644 --- a/script/hassfest/zeroconf.py +++ b/script/hassfest/zeroconf.py @@ -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):