Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev' of https://github.com/rccoleman/lamarzocco into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rccoleman authored and github-actions[bot] committed Dec 18, 2020
2 parents 3c76b12 + 1af5d20 commit c8a2e32
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 47 deletions.
17 changes: 7 additions & 10 deletions custom_components/lamarzocco/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
"""The La Marzocco integration."""

from .const import DOMAIN
from .api import LaMarzocco
import asyncio
import logging
from datetime import timedelta

from homeassistant.config_entries import ConfigEntry
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.core import HomeAssistant
from datetime import timedelta

import logging, asyncio
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed

from homeassistant.helpers.update_coordinator import (
DataUpdateCoordinator,
UpdateFailed,
)
from .api import LaMarzocco
from .const import DOMAIN

SCAN_INTERVAL = timedelta(minutes=10)
_LOGGER = logging.getLogger(__name__)
Expand Down
27 changes: 13 additions & 14 deletions custom_components/lamarzocco/api.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
import errno
import logging
from socket import error as SocketError

import lmdirect.cmds as CMD
from authlib.integrations.base_client.errors import OAuthError
from authlib.integrations.httpx_client import AsyncOAuth2Client
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
from lmdirect import LMDirect

from .const import (
CONF_SERIAL_NUMBER,
CONF_CLIENT_ID,
CONF_CLIENT_SECRET,
CONF_SERIAL_NUMBER,
CUSTOMER_URL,
GW_URL,
TOKEN_URL,
CUSTOMER_URL,
)
from socket import error as SocketError
from authlib.integrations.httpx_client import AsyncOAuth2Client
from authlib.integrations.base_client.errors import OAuthError
from homeassistant.const import (
CONF_HOST,
CONF_USERNAME,
CONF_PASSWORD,
)
from lmdirect import LMDirect
import lmdirect.cmds as CMD
import logging, errno

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -96,4 +95,4 @@ async def power(self, power):


class AuthFail(BaseException):
"""Error to indicate there is invalid auth."""
"""Error to indicate there is invalid auth."""
20 changes: 7 additions & 13 deletions custom_components/lamarzocco/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
"""Config flow for La Marzocco integration."""
import logging
from typing import Any, Dict, Optional
from authlib.integrations.base_client.errors import OAuthError

import voluptuous as vol
from authlib.integrations.base_client.errors import OAuthError
from homeassistant import config_entries, core, exceptions
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.helpers import config_validation as cv

from homeassistant.const import (
CONF_USERNAME,
CONF_PASSWORD,
CONF_HOST,
CONF_NAME,
CONF_PASSWORD,
CONF_TYPE,
CONF_HOST,
CONF_USERNAME,
)
from homeassistant.helpers import config_validation as cv

from .const import (
CONF_CLIENT_ID,
CONF_CLIENT_SECRET,
CONF_SERIAL_NUMBER,
DOMAIN,
)
from .api import LaMarzocco
from .const import CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_SERIAL_NUMBER, DOMAIN

_LOGGER = logging.getLogger(__name__)

Expand Down
20 changes: 10 additions & 10 deletions custom_components/lamarzocco/switch.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import logging
from typing import Dict

from homeassistant.components.switch import SwitchEntity
from homeassistant.core import callback
from homeassistant.helpers.restore_state import RestoreEntity
from homeassistant.helpers.update_coordinator import CoordinatorEntity

from .const import (
ATTR_STATUS_MAP,
DOMAIN,
DEVICE_MAP,
ATTRIBUTION,
CONF_SERIAL_NUMBER,
DEFAULT_NAME,
DEVICE_MAP,
DOMAIN,
STATUS_MACHINE_STATUS,
TEMP_KEYS,
)

from typing import Dict
import logging

from homeassistant.components.switch import SwitchEntity
from homeassistant.helpers.restore_state import RestoreEntity
from homeassistant.core import callback
from homeassistant.helpers.update_coordinator import CoordinatorEntity

_LOGGER = logging.getLogger(__name__)


Expand Down

0 comments on commit c8a2e32

Please sign in to comment.