diff --git a/custom_components/unifi_voucher/const.py b/custom_components/unifi_voucher/const.py index 870351b..77a68e2 100644 --- a/custom_components/unifi_voucher/const.py +++ b/custom_components/unifi_voucher/const.py @@ -24,9 +24,9 @@ CONF_VOUCHER_NUMBER = "voucher_number" CONF_VOUCHER_QUOTA = "voucher_quota" CONF_VOUCHER_EXPIRE = "voucher_expire" -CONF_VOUCHER_BYTE_QUOTA = "byte_quota" -CONF_VOUCHER_UP_BANDWIDTH = "up_bandwidth" -CONF_VOUCHER_DOWN_BANDWIDTH = "down_bandwidth" +CONF_VOUCHER_BYTE_QUOTA = "voucher_byte_quota" +CONF_VOUCHER_UP_BANDWIDTH = "voucher_up_bandwidth" +CONF_VOUCHER_DOWN_BANDWIDTH = "voucher_down_bandwidth" ATTR_EXTRA_STATE_ATTRIBUTES = "extra_state_attributes" ATTR_LAST_PULL = "last_pull" diff --git a/custom_components/unifi_voucher/sensor.py b/custom_components/unifi_voucher/sensor.py index 968ea43..5c90246 100644 --- a/custom_components/unifi_voucher/sensor.py +++ b/custom_components/unifi_voucher/sensor.py @@ -15,6 +15,7 @@ from .const import ( DOMAIN, + CONF_WLAN_NAME, ATTR_VOUCHER, ) from .coordinator import UnifiVoucherCoordinator @@ -78,7 +79,7 @@ def _update_extra_state_attributes(self) -> None: return None _x = { - "wlan_name": self.coordinator.get_wlan_name(), + CONF_WLAN_NAME: self.coordinator.get_wlan_name(), "quota": voucher.get("quota"), "used": voucher.get("used"), "duration": str(voucher.get("duration")), # TODO: Localized string