Skip to content

Commit

Permalink
remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
bbirnbach committed Nov 27, 2024
1 parent 30fb5a5 commit 64c8dae
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
9 changes: 2 additions & 7 deletions custom_components/homeassistantedupage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import logging
import asyncio
from datetime import datetime, timedelta
from edupage_api import Edupage as EdupageApi
from edupage_api.exceptions import BadCredentialsException, CaptchaException, SecondFactorFailedException
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.const import Platform
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from .homeassistant_edupage import Edupage
from edupage_api.classes import Class
from edupage_api.people import EduTeacher
from edupage_api.people import Gender
from edupage_api.classrooms import Classroom

from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from .const import DOMAIN, CONF_PHPSESSID, CONF_SUBDOMAIN, CONF_STUDENT_ID, CONF_STUDENT_NAME

Expand All @@ -37,7 +32,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
coordinator = None

try:
login_success = await hass.async_add_executor_job(
await hass.async_add_executor_job(
edupage.login, username, password, subdomain
)
_LOGGER.debug("INIT login_success")
Expand Down
2 changes: 0 additions & 2 deletions custom_components/homeassistantedupage/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from edupage_api import Edupage
from edupage_api.exceptions import BadCredentialsException, SecondFactorFailedException
from homeassistant import config_entries
from homeassistant.core import callback
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from.const import CONF_PHPSESSID, CONF_SUBDOMAIN, CONF_STUDENT_ID, CONF_STUDENT_NAME

Expand Down Expand Up @@ -73,7 +72,6 @@ async def async_step_user(self, user_input=None):
errors["base"] = "no_students_found"
else:
# Speichere Benutzer-Eingaben
#bla = api.session.cookies["PHPSESSID"]
cookies = api.session.cookies.get_dict()
phpsess = cookies["PHPSESSID"]
user_input[CONF_PHPSESSID] = phpsess
Expand Down
10 changes: 0 additions & 10 deletions custom_components/homeassistantedupage/homeassistant_edupage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,8 @@
import asyncio
from edupage_api import Login
from edupage_api import Edupage as APIEdupage
from edupage_api.classes import Class
from edupage_api.people import EduTeacher
from edupage_api.people import Gender
from edupage_api.classrooms import Classroom
from zoneinfo import ZoneInfo
from edupage_api.exceptions import BadCredentialsException, CaptchaException, SecondFactorFailedException


from datetime import datetime
from datetime import date
from homeassistant.helpers.update_coordinator import UpdateFailed
from concurrent.futures import ThreadPoolExecutor

_LOGGER = logging.getLogger(__name__)

Expand Down

0 comments on commit 64c8dae

Please sign in to comment.