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

Commit

Permalink
fix: move DOMAIN contant to const.py
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Miller <[email protected]>
  • Loading branch information
Djelibeybi committed Dec 19, 2022
1 parent f3de118 commit 9256627
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 15 deletions.
7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
repos:
- repo: local
hooks:
- id: manifest
name: Update manifest.json
entry: bin/update_manifest
language: script
files: ^(custom_components/.+/const\.py|requirements\.txt)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
3 changes: 1 addition & 2 deletions custom_components/soma_connect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
from homeassistant.const import CONF_HOST, CONF_PORT, Platform
from homeassistant.core import HomeAssistant

from .const import DOMAIN
from .coordinator import SomaConnectUpdateCoordinator

DOMAIN = "soma_connect"

PLATFORMS = [Platform.COVER, Platform.SENSOR]


Expand Down
2 changes: 1 addition & 1 deletion custom_components/soma_connect/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from homeassistant import config_entries
from homeassistant.const import CONF_HOST, CONF_PORT

from . import DOMAIN
from .const import DOMAIN

_LOGGER = logging.getLogger(__name__)

Expand Down
3 changes: 3 additions & 0 deletions custom_components/soma_connect/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Constants for SOMA Connect."""

DOMAIN = "soma_connect"
2 changes: 1 addition & 1 deletion custom_components/soma_connect/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from homeassistant.helpers.debounce import Debouncer
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed

from . import DOMAIN
from .const import DOMAIN

SCAN_INTERVAL = timedelta(seconds=30)
DELAY_BEFORE_UPDATE = 1.0
Expand Down
2 changes: 1 addition & 1 deletion custom_components/soma_connect/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from . import DOMAIN
from .const import DOMAIN
from .coordinator import SomaConnectUpdateCoordinator
from .entity import SomaConnectEntity

Expand Down
2 changes: 1 addition & 1 deletion custom_components/soma_connect/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity

from . import DOMAIN
from .const import DOMAIN
from .coordinator import SomaConnectUpdateCoordinator


Expand Down
2 changes: 1 addition & 1 deletion custom_components/soma_connect/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "soma_connect",
"name": "SOMA Connect",
"version": "2022.12.2",
"version": "2022.12.3",
"config_flow": true,
"documentation": "https://github.com/Djelibeybi/hass-soma-connect",
"issue_tracker": "https://github.com/Djelibeybi/hass-soma-connect/issues",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/soma_connect/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from . import DOMAIN
from .const import DOMAIN
from .coordinator import SomaConnectUpdateCoordinator
from .entity import SomaConnectEntity

Expand Down

0 comments on commit 9256627

Please sign in to comment.