mirror of
https://github.com/home-assistant/core.git
synced 2025-11-01 23:19:22 +00:00
Refactoring. Moved LCN constants to const.py (#21376)
This commit is contained in:
committed by
Fabian Affolter
parent
b588c1fe1c
commit
fc13e37d8d
26
homeassistant/components/lcn/const.py
Normal file
26
homeassistant/components/lcn/const.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""Constants for the LCN component."""
|
||||
import re
|
||||
|
||||
DOMAIN = 'lcn'
|
||||
DATA_LCN = 'lcn'
|
||||
DEFAULT_NAME = 'pchk'
|
||||
|
||||
# Regex for address validation
|
||||
PATTERN_ADDRESS = re.compile('^((?P<conn_id>\\w+)\\.)?s?(?P<seg_id>\\d+)'
|
||||
'\\.(?P<type>m|g)?(?P<id>\\d+)$')
|
||||
|
||||
CONF_CONNECTIONS = 'connections'
|
||||
CONF_SK_NUM_TRIES = 'sk_num_tries'
|
||||
CONF_OUTPUT = 'output'
|
||||
CONF_DIM_MODE = 'dim_mode'
|
||||
CONF_DIMMABLE = 'dimmable'
|
||||
CONF_TRANSITION = 'transition'
|
||||
CONF_MOTOR = 'motor'
|
||||
|
||||
DIM_MODES = ['STEPS50', 'STEPS200']
|
||||
OUTPUT_PORTS = ['OUTPUT1', 'OUTPUT2', 'OUTPUT3', 'OUTPUT4']
|
||||
RELAY_PORTS = ['RELAY1', 'RELAY2', 'RELAY3', 'RELAY4',
|
||||
'RELAY5', 'RELAY6', 'RELAY7', 'RELAY8',
|
||||
'MOTORONOFF1', 'MOTORUPDOWN1', 'MOTORONOFF2', 'MOTORUPDOWN2',
|
||||
'MOTORONOFF3', 'MOTORUPDOWN3', 'MOTORONOFF4', 'MOTORUPDOWN4']
|
||||
MOTOR_PORTS = ['MOTOR1', 'MOTOR2', 'MOTOR3', 'MOTOR4']
|
||||
Reference in New Issue
Block a user