mirror of
https://github.com/home-assistant/core.git
synced 2026-08-24 10:13:52 -05:00
Make _LOGGER public in nina (#177335)
This commit is contained in:
@@ -8,13 +8,13 @@ from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from .const import (
|
||||
_LOGGER,
|
||||
ALL_MATCH_REGEX,
|
||||
CONF_AREA_FILTER,
|
||||
CONF_FILTER_CORONA,
|
||||
CONF_FILTERS,
|
||||
CONF_HEADLINE_FILTER,
|
||||
DOMAIN,
|
||||
LOGGER,
|
||||
NO_MATCH_REGEX,
|
||||
)
|
||||
from .coordinator import NinaConfigEntry, NINADataUpdateCoordinator
|
||||
@@ -54,7 +54,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: NinaConfigEntry) -> bo
|
||||
version = entry.version
|
||||
minor_version = entry.minor_version
|
||||
|
||||
_LOGGER.debug("Migrating from version %s.%s", version, minor_version)
|
||||
LOGGER.debug("Migrating from version %s.%s", version, minor_version)
|
||||
|
||||
new_data: dict[str, Any] = {**entry.data, CONF_FILTERS: {}}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
from homeassistant.helpers.typing import VolDictType
|
||||
|
||||
from .const import (
|
||||
_LOGGER,
|
||||
ALL_MATCH_REGEX,
|
||||
CONF_AREA_FILTER,
|
||||
CONF_FILTERS,
|
||||
@@ -28,6 +27,7 @@ from .const import (
|
||||
CONST_REGION_MAPPING,
|
||||
CONST_REGIONS,
|
||||
DOMAIN,
|
||||
LOGGER,
|
||||
NO_MATCH_REGEX,
|
||||
SENSOR_SUFFIXES,
|
||||
)
|
||||
@@ -146,7 +146,7 @@ class NinaConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
except ApiError:
|
||||
return self.async_abort(reason="no_fetch")
|
||||
except Exception: # noqa: BLE001
|
||||
_LOGGER.exception("Unexpected exception")
|
||||
LOGGER.exception("Unexpected exception")
|
||||
return self.async_abort(reason="unknown")
|
||||
|
||||
self.regions = split_regions(self._all_region_codes_sorted, self.regions)
|
||||
@@ -227,7 +227,7 @@ class OptionsFlowHandler(OptionsFlowWithReload):
|
||||
except ApiError:
|
||||
return self.async_abort(reason="no_fetch")
|
||||
except Exception: # noqa: BLE001
|
||||
_LOGGER.exception("Unexpected exception")
|
||||
LOGGER.exception("Unexpected exception")
|
||||
return self.async_abort(reason="unknown")
|
||||
|
||||
self.regions = split_regions(self._all_region_codes_sorted, self.regions)
|
||||
|
||||
@@ -4,7 +4,7 @@ from datetime import timedelta
|
||||
from logging import Logger, getLogger
|
||||
from typing import Final
|
||||
|
||||
_LOGGER: Logger = getLogger(__package__)
|
||||
LOGGER: Logger = getLogger(__package__)
|
||||
|
||||
SCAN_INTERVAL: timedelta = timedelta(minutes=5)
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||
|
||||
from .const import (
|
||||
_LOGGER,
|
||||
CONF_AREA_FILTER,
|
||||
CONF_FILTERS,
|
||||
CONF_HEADLINE_FILTER,
|
||||
CONF_REGIONS,
|
||||
DOMAIN,
|
||||
LOGGER,
|
||||
SCAN_INTERVAL,
|
||||
)
|
||||
|
||||
@@ -70,7 +70,7 @@ class NINADataUpdateCoordinator(
|
||||
|
||||
super().__init__(
|
||||
hass,
|
||||
_LOGGER,
|
||||
LOGGER,
|
||||
config_entry=config_entry,
|
||||
name=DOMAIN,
|
||||
update_interval=SCAN_INTERVAL,
|
||||
@@ -123,7 +123,7 @@ class NINADataUpdateCoordinator(
|
||||
if re.search(
|
||||
self.headline_filter, raw_warn.headline, flags=re.IGNORECASE
|
||||
):
|
||||
_LOGGER.debug(
|
||||
LOGGER.debug(
|
||||
"Ignore warning (%s) by headline filter (%s) with headline: %s",
|
||||
raw_warn.id,
|
||||
self.headline_filter,
|
||||
@@ -138,7 +138,7 @@ class NINADataUpdateCoordinator(
|
||||
if not re.search(
|
||||
self.area_filter, affected_areas_string, flags=re.IGNORECASE
|
||||
):
|
||||
_LOGGER.debug(
|
||||
LOGGER.debug(
|
||||
"Ignore warning (%s) by area filter (%s) with area: %s",
|
||||
raw_warn.id,
|
||||
self.area_filter,
|
||||
|
||||
Reference in New Issue
Block a user