From 8feac3a6b247898ad68dd6cbc6e672d11d215353 Mon Sep 17 00:00:00 2001 From: Tijs Verkoyen Date: Wed, 12 Apr 2023 17:27:07 +0200 Subject: [PATCH 1/2] Bugfix: use empty values if fields are not present. --- custom_components/energy_id/energy_id/record.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/energy_id/energy_id/record.py b/custom_components/energy_id/energy_id/record.py index 999063a..7018555 100644 --- a/custom_components/energy_id/energy_id/record.py +++ b/custom_components/energy_id/energy_id/record.py @@ -88,10 +88,10 @@ def from_json(cls, json): address = None if 'address' in json: address = EnergyIDAddress( - json['address']['streetAddress'], - json['address']['postalCode'], - json['address']['city'], - json['address']['country'] + json['address']['streetAddress'] if 'streetAddress' in json['address'] else "", + json['address']['postalCode'] if 'postalCode' in json['address'] else "", + json['address']['city'] if 'city' in json['address'] else "", + json['address']['country'] if 'country' in json['address'] else "", ) created = None From f336c0de82a2f580592189c5b8c9efa2f4d465e8 Mon Sep 17 00:00:00 2001 From: Tijs Verkoyen Date: Wed, 12 Apr 2023 17:28:05 +0200 Subject: [PATCH 2/2] Bump version --- custom_components/energy_id/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/energy_id/manifest.json b/custom_components/energy_id/manifest.json index fb0d3f4..52aeb09 100644 --- a/custom_components/energy_id/manifest.json +++ b/custom_components/energy_id/manifest.json @@ -11,5 +11,5 @@ "requirements": [ ], "iot_class": "cloud_polling", - "version": "1.2.0" + "version": "1.2.1" }