"""vnStat collection and parsing methods for OPNsenseClient.""" from __future__ import annotations from collections.abc import Mapping, MutableMapping, Sequence from datetime import date, datetime, timedelta, tzinfo import re from typing import Any from ._typing import AiopnsenseClientProtocol from .helpers import _LOGGER, _log_errors, normalize_lookup_token, try_to_float _VSTAT_HEADER_RE = re.compile( r"^\s*(?P[^\s]+)\s*/\s*(?Phourly|daily|monthly|yearly)\s*$", re.IGNORECASE, ) _VSTAT_ROW_RE = re.compile( r"^\s*(?P