diff --git a/custom_components/battery_notes/sensor.py b/custom_components/battery_notes/sensor.py index 63a564180..cd3515342 100644 --- a/custom_components/battery_notes/sensor.py +++ b/custom_components/battery_notes/sensor.py @@ -251,7 +251,7 @@ def extra_state_attributes(self) -> dict[str, str] | None: """Return the state attributes of the battery type.""" matches: re.Match = re.search( - "^(\d+)(?=x)(?:x\s)(\w+$)|([\s\S]+)", self._battery_type + r"^(\d+)(?=x)(?:x\s)(\w+$)|([\s\S]+)", self._battery_type ) if matches: _qty = matches.group(1) if matches.group(1) is not None else "1"