mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Adds Orange Pi GPIO platform (#22541)
* Adds Orange Pi GPIO platform * Add manifest.json * Remove cover platform * Apply requested changes * Remove switch platform * Update CODEOWNERS * Remove obsolete dependecies/requirements
This commit is contained in:
committed by
Rohan Kapoor
parent
f588fef3b4
commit
df475cb797
21
homeassistant/components/orangepi_gpio/const.py
Normal file
21
homeassistant/components/orangepi_gpio/const.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Constants for Orange Pi GPIO."""
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
|
||||
from . import CONF_PINMODE, PINMODES
|
||||
|
||||
CONF_INVERT_LOGIC = 'invert_logic'
|
||||
CONF_PORTS = 'ports'
|
||||
|
||||
DEFAULT_INVERT_LOGIC = False
|
||||
|
||||
_SENSORS_SCHEMA = vol.Schema({
|
||||
cv.positive_int: cv.string,
|
||||
})
|
||||
|
||||
PORT_SCHEMA = {
|
||||
vol.Required(CONF_PORTS): _SENSORS_SCHEMA,
|
||||
vol.Required(CONF_PINMODE): vol.In(PINMODES),
|
||||
vol.Optional(CONF_INVERT_LOGIC, default=DEFAULT_INVERT_LOGIC): cv.boolean,
|
||||
}
|
||||
Reference in New Issue
Block a user