Use core constants for rpi_gpio (#46442)
This commit is contained in:
parent
190a9f66cb
commit
74f5f8976f
3 changed files with 1 additions and 5 deletions
|
@ -32,7 +32,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the Raspberry PI GPIO devices."""
|
"""Set up the Raspberry PI GPIO devices."""
|
||||||
|
|
||||||
setup_reload_service(hass, DOMAIN, PLATFORMS)
|
setup_reload_service(hass, DOMAIN, PLATFORMS)
|
||||||
|
|
||||||
pull_mode = config.get(CONF_PULL_MODE)
|
pull_mode = config.get(CONF_PULL_MODE)
|
||||||
|
|
|
@ -5,13 +5,12 @@ import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components import rpi_gpio
|
from homeassistant.components import rpi_gpio
|
||||||
from homeassistant.components.cover import PLATFORM_SCHEMA, CoverEntity
|
from homeassistant.components.cover import PLATFORM_SCHEMA, CoverEntity
|
||||||
from homeassistant.const import CONF_NAME
|
from homeassistant.const import CONF_COVERS, CONF_NAME
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.reload import setup_reload_service
|
from homeassistant.helpers.reload import setup_reload_service
|
||||||
|
|
||||||
from . import DOMAIN, PLATFORMS
|
from . import DOMAIN, PLATFORMS
|
||||||
|
|
||||||
CONF_COVERS = "covers"
|
|
||||||
CONF_RELAY_PIN = "relay_pin"
|
CONF_RELAY_PIN = "relay_pin"
|
||||||
CONF_RELAY_TIME = "relay_time"
|
CONF_RELAY_TIME = "relay_time"
|
||||||
CONF_STATE_PIN = "state_pin"
|
CONF_STATE_PIN = "state_pin"
|
||||||
|
@ -49,7 +48,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the RPi cover platform."""
|
"""Set up the RPi cover platform."""
|
||||||
|
|
||||||
setup_reload_service(hass, DOMAIN, PLATFORMS)
|
setup_reload_service(hass, DOMAIN, PLATFORMS)
|
||||||
|
|
||||||
relay_time = config.get(CONF_RELAY_TIME)
|
relay_time = config.get(CONF_RELAY_TIME)
|
||||||
|
|
|
@ -28,7 +28,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the Raspberry PI GPIO devices."""
|
"""Set up the Raspberry PI GPIO devices."""
|
||||||
|
|
||||||
setup_reload_service(hass, DOMAIN, PLATFORMS)
|
setup_reload_service(hass, DOMAIN, PLATFORMS)
|
||||||
|
|
||||||
invert_logic = config.get(CONF_INVERT_LOGIC)
|
invert_logic = config.get(CONF_INVERT_LOGIC)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue