Skip to content

Commit 5cdcc3e

Browse files
committed
Moved const to const.py
1 parent 554c0ed commit 5cdcc3e

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

custom_components/binary_sensor/ihc.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
from homeassistant.components.binary_sensor import (
99
BinarySensorDevice, PLATFORM_SCHEMA, DEVICE_CLASSES_SCHEMA)
1010
from homeassistant.const import STATE_UNKNOWN, CONF_NAME, CONF_TYPE
11+
12+
from ..ihc.const import *
1113
from ..ihc import get_ihc_platform
1214
from ..ihc.ihcdevice import IHCDevice
1315

1416
DEPENDENCIES = ['ihc']
1517

16-
CONF_AUTOSETUP = 'autosetup'
17-
CONF_IDS = 'ids'
18-
CONF_INVERTING = 'inverting'
19-
2018
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
2119
vol.Optional(CONF_AUTOSETUP, default='False') : cv.boolean,
2220
vol.Optional(CONF_IDS) : {

custom_components/ihc/const.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
IHC platform constants
33
"""
44

5+
CONF_AUTOSETUP = 'autosetup'
6+
CONF_IDS = 'ids'
7+
CONF_INVERTING = 'inverting'
8+
9+
510
SERVICE_SET_RUNTIME_VALUE_BOOL = "set_runtime_value_bool"
611
SERVICE_SET_RUNTIME_VALUE_INT = "set_runtime_value_int"
712
SERVICE_SET_RUNTIME_VALUE_FLOAT = "set_runtime_value_float"

custom_components/light/ihc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88
ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, PLATFORM_SCHEMA, Light)
99
import homeassistant.helpers.config_validation as cv
1010
from homeassistant.const import STATE_UNKNOWN
11+
12+
from ..ihc.const import *
1113
from ..ihc import get_ihc_platform
1214
from ..ihc.ihcdevice import IHCDevice
1315

1416
DEPENDENCIES = ['ihc']
1517

16-
CONF_AUTOSETUP = 'autosetup'
17-
CONF_IDS = 'ids'
18-
1918
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
2019
vol.Optional(CONF_AUTOSETUP, default='False'): cv.boolean,
2120
vol.Optional(CONF_IDS): vol.Schema(vol.Required({cv.string: cv.string}))

custom_components/sensor/ihc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88
import homeassistant.helpers.config_validation as cv
99
from homeassistant.helpers.entity import Entity
1010
from homeassistant.const import CONF_NAME, CONF_TYPE, CONF_UNIT_OF_MEASUREMENT
11+
12+
from ..ihc.const import *
1113
from ..ihc import get_ihc_platform
1214
from ..ihc.ihcdevice import IHCDevice
1315

1416
DEPENDENCIES = ['ihc']
1517

16-
CONF_AUTOSETUP = 'autosetup'
17-
CONF_IDS = 'ids'
18-
1918
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
2019
vol.Optional(CONF_AUTOSETUP, default='False') : cv.boolean,
2120
vol.Optional(CONF_IDS) : {

custom_components/switch/ihc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
import voluptuous as vol
77
import homeassistant.helpers.config_validation as cv
88
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA)
9+
10+
from ..ihc.const import *
911
from ..ihc import get_ihc_platform
1012
from ..ihc.ihcdevice import IHCDevice
1113

1214
DEPENDENCIES = ['ihc']
1315

14-
CONF_AUTOSETUP = 'autosetup'
15-
CONF_IDS = 'ids'
16-
1716
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
1817
vol.Optional(CONF_AUTOSETUP, default='False'): cv.boolean,
1918
vol.Optional(CONF_IDS): vol.Schema(vol.Required({cv.string: cv.string}))

0 commit comments

Comments
 (0)