diff --git a/custom_components/unifi_voucher/sensor.py b/custom_components/unifi_voucher/sensor.py index b948ace..3ebffae 100644 --- a/custom_components/unifi_voucher/sensor.py +++ b/custom_components/unifi_voucher/sensor.py @@ -77,7 +77,7 @@ def _update_extra_state_attributes(self) -> None: "quota": voucher.get("quota"), "used": voucher.get("used"), "duration": str(voucher.get("duration")), - "status": voucher.get("status"), + "status": voucher.get("status").lower(), "create_time": voucher.get("create_time"), } if voucher.get("start_time") is not None: diff --git a/custom_components/unifi_voucher/strings.json b/custom_components/unifi_voucher/strings.json index 64c7554..1bc858a 100644 --- a/custom_components/unifi_voucher/strings.json +++ b/custom_components/unifi_voucher/strings.json @@ -89,8 +89,11 @@ "status": { "name": "Status", "state": { - "true": "Verbunden", - "false": "Getrennt" + "used": "Used once", + "used_multiple": "Used multiple times", + "expired": "Expired", + "valid_one": "Valid once", + "valid_multi": "Valid multiple times" } }, "last_pull": { diff --git a/custom_components/unifi_voucher/translations/de.json b/custom_components/unifi_voucher/translations/de.json index fc8e4b8..7a89d43 100644 --- a/custom_components/unifi_voucher/translations/de.json +++ b/custom_components/unifi_voucher/translations/de.json @@ -89,11 +89,11 @@ "status": { "name": "Status", "state": { - "USED": "Einmal benutzt", - "USED_MULTIPLE": "Mehrmals benutzt", - "EXPIRED": "Abgelaufen", - "VALID_ONE": "Einmal gültig", - "VALID_MULTI": "Mehrmals gültig" + "used": "Einmal benutzt", + "used_multiple": "Mehrmals benutzt", + "expired": "Abgelaufen", + "valid_one": "Einmal gültig", + "valid_multi": "Mehrmals gültig" } }, "last_pull": { diff --git a/custom_components/unifi_voucher/translations/en.json b/custom_components/unifi_voucher/translations/en.json index 88b064c..365a26a 100644 --- a/custom_components/unifi_voucher/translations/en.json +++ b/custom_components/unifi_voucher/translations/en.json @@ -89,11 +89,11 @@ "status": { "name": "Status", "state": { - "USED": "Used once", - "USED_MULTIPLE": "Used multiple times", - "EXPIRED": "Expired", - "VALID_ONE": "Valid once", - "VALID_MULTI": "Valid multiple times" + "used": "Used once", + "used_multiple": "Used multiple times", + "expired": "Expired", + "valid_one": "Valid once", + "valid_multi": "Valid multiple times" } }, "last_pull": {