mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Bump fritzconnection and remove workarounds (#63050)
* Bump fritzconnection and remove workarounds * Cleanup fritzbox_callmonitor
This commit is contained in:
parent
0a95b2c591
commit
da24b7ce2f
@ -1,9 +1,11 @@
|
|||||||
"""Support for AVM Fritz!Box functions."""
|
"""Support for AVM Fritz!Box functions."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from fritzconnection.core.exceptions import FritzConnectionException, FritzSecurityError
|
from fritzconnection.core.exceptions import (
|
||||||
from fritzconnection.core.logger import fritzlogger
|
FritzConnectionException,
|
||||||
from requests import exceptions
|
FritzResourceError,
|
||||||
|
FritzSecurityError,
|
||||||
|
)
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME
|
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME
|
||||||
@ -16,13 +18,6 @@ from .services import async_setup_services, async_unload_services
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
level = _LOGGER.getEffectiveLevel()
|
|
||||||
_LOGGER.info(
|
|
||||||
"Setting logging level of fritzconnection: %s", logging.getLevelName(level)
|
|
||||||
)
|
|
||||||
fritzlogger.set_level(level)
|
|
||||||
fritzlogger.enable()
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
"""Set up fritzboxtools from config entry."""
|
"""Set up fritzboxtools from config entry."""
|
||||||
@ -39,7 +34,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
await fritz_tools.async_setup(entry.options)
|
await fritz_tools.async_setup(entry.options)
|
||||||
except FritzSecurityError as ex:
|
except FritzSecurityError as ex:
|
||||||
raise ConfigEntryAuthFailed from ex
|
raise ConfigEntryAuthFailed from ex
|
||||||
except (FritzConnectionException, exceptions.ConnectionError) as ex:
|
except (FritzConnectionException, FritzResourceError) as ex:
|
||||||
raise ConfigEntryNotReady from ex
|
raise ConfigEntryNotReady from ex
|
||||||
|
|
||||||
hass.data.setdefault(DOMAIN, {})
|
hass.data.setdefault(DOMAIN, {})
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "AVM FRITZ!Box Tools",
|
"name": "AVM FRITZ!Box Tools",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/fritz",
|
"documentation": "https://www.home-assistant.io/integrations/fritz",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"fritzconnection==1.7.2",
|
"fritzconnection==1.8.0",
|
||||||
"xmltodict==0.12.0"
|
"xmltodict==0.12.0"
|
||||||
],
|
],
|
||||||
"dependencies": ["network"],
|
"dependencies": ["network"],
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from fritzconnection.core.exceptions import FritzConnectionException, FritzSecurityError
|
from fritzconnection.core.exceptions import FritzConnectionException, FritzSecurityError
|
||||||
from fritzconnection.core.logger import fritzlogger
|
|
||||||
from requests.exceptions import ConnectionError as RequestsConnectionError
|
from requests.exceptions import ConnectionError as RequestsConnectionError
|
||||||
|
|
||||||
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
|
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
|
||||||
@ -20,13 +19,6 @@ from .const import (
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
level = _LOGGER.getEffectiveLevel()
|
|
||||||
_LOGGER.info(
|
|
||||||
"Setting logging level of fritzconnection: %s", logging.getLevelName(level)
|
|
||||||
)
|
|
||||||
fritzlogger.set_level(level)
|
|
||||||
fritzlogger.enable()
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry):
|
async def async_setup_entry(hass, config_entry):
|
||||||
"""Set up the fritzbox_callmonitor platforms."""
|
"""Set up the fritzbox_callmonitor platforms."""
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "AVM FRITZ!Box Call Monitor",
|
"name": "AVM FRITZ!Box Call Monitor",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/fritzbox_callmonitor",
|
"documentation": "https://www.home-assistant.io/integrations/fritzbox_callmonitor",
|
||||||
"requirements": ["fritzconnection==1.7.2"],
|
"requirements": ["fritzconnection==1.8.0"],
|
||||||
"codeowners": [],
|
"codeowners": [],
|
||||||
"iot_class": "local_polling"
|
"iot_class": "local_polling"
|
||||||
}
|
}
|
||||||
|
@ -688,7 +688,7 @@ freesms==0.2.0
|
|||||||
|
|
||||||
# homeassistant.components.fritz
|
# homeassistant.components.fritz
|
||||||
# homeassistant.components.fritzbox_callmonitor
|
# homeassistant.components.fritzbox_callmonitor
|
||||||
fritzconnection==1.7.2
|
fritzconnection==1.8.0
|
||||||
|
|
||||||
# homeassistant.components.google_translate
|
# homeassistant.components.google_translate
|
||||||
gTTS==2.2.3
|
gTTS==2.2.3
|
||||||
|
@ -422,7 +422,7 @@ freebox-api==0.0.10
|
|||||||
|
|
||||||
# homeassistant.components.fritz
|
# homeassistant.components.fritz
|
||||||
# homeassistant.components.fritzbox_callmonitor
|
# homeassistant.components.fritzbox_callmonitor
|
||||||
fritzconnection==1.7.2
|
fritzconnection==1.8.0
|
||||||
|
|
||||||
# homeassistant.components.google_translate
|
# homeassistant.components.google_translate
|
||||||
gTTS==2.2.3
|
gTTS==2.2.3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user