more flex
This commit is contained in:
parent
207b756df6
commit
671563995c
8
base.yml
8
base.yml
|
@ -41,6 +41,10 @@ binary_sensor:
|
|||
name: "${friendly_name} Motor"
|
||||
device_class: running
|
||||
entity_category: diagnostic
|
||||
- platform: gpio
|
||||
pin: D2
|
||||
name: "${friendly_name} Motor"
|
||||
|
||||
|
||||
number:
|
||||
- platform: ratgdo
|
||||
|
@ -68,10 +72,10 @@ light:
|
|||
|
||||
uart:
|
||||
tx_pin:
|
||||
number: 2
|
||||
number: D4 # red control terminal / GarageDoorOpener (UART1 TX) pin is D4 on D1 Mini
|
||||
inverted: true
|
||||
rx_pin:
|
||||
number: 4
|
||||
number: D2 # red control terminal / GarageDoorOpener (UART1 RX) pin is D2 on D1 Mini
|
||||
inverted: true
|
||||
baud_rate: 9600
|
||||
|
||||
|
|
|
@ -14,27 +14,25 @@ RATGDO = ratgdo_ns.class_("RATGDOComponent", cg.Component, uart.UARTDevice)
|
|||
|
||||
CONF_OUTPUT_GDO = "output_gdo_pin"
|
||||
DEFAULT_OUTPUT_GDO = (
|
||||
2 # D4 ed control terminal / GarageDoorOpener (UART1 TX) pin is D4 on D1 Mini
|
||||
"D4" # D4 red control terminal / GarageDoorOpener (UART1 TX) pin is D4 on D1 Mini
|
||||
)
|
||||
CONF_INPUT_GDO = "input_gdo_pin"
|
||||
DEFAULT_INPUT_GDO = (
|
||||
4 # D2 red control terminal / GarageDoorOpener (UART1 RX) pin is D2 on D1 Mini
|
||||
)
|
||||
DEFAULT_INPUT_GDO = "D2" # D2 red control terminal / GarageDoorOpener (UART1 RX) pin is D2 on D1 Mini
|
||||
CONF_INPUT_OBST = "input_obst_pin"
|
||||
DEFAULT_INPUT_OBST = 13 # D7 black obstruction sensor terminal
|
||||
DEFAULT_INPUT_OBST = "D7" # D7 black obstruction sensor terminal
|
||||
|
||||
CONF_TRIGGER_OPEN = "trigger_open_pin"
|
||||
DEFAULT_TRIGGER_OPEN = 14 # D5 dry contact for opening door
|
||||
DEFAULT_TRIGGER_OPEN = "D5" # D5 dry contact for opening door
|
||||
CONF_TRIGGER_CLOSE = "trigger_close_pin"
|
||||
DEFAULT_TRIGGER_CLOSE = 12 # D6 dry contact for closing door
|
||||
DEFAULT_TRIGGER_CLOSE = "D6" # D6 dry contact for closing door
|
||||
CONF_TRIGGER_LIGHT = "trigger_light_pin"
|
||||
DEFAULT_TRIGGER_LIGHT = 0 # D3 dry contact for triggering light (no discrete light commands, so toggle only)
|
||||
DEFAULT_TRIGGER_LIGHT = "D3" # D3 dry contact for triggering light (no discrete light commands, so toggle only)
|
||||
|
||||
CONF_STATUS_DOOR = "status_door_pin"
|
||||
DEFAULT_STATUS_DOOR = 16 # D0 output door status, HIGH for open, LOW for closed
|
||||
DEFAULT_STATUS_DOOR = "D0" # D0 output door status, HIGH for open, LOW for closed
|
||||
CONF_STATUS_OBST = "status_obst_pin"
|
||||
DEFAULT_STATUS_OBST = (
|
||||
15 # D8 output for obstruction status, HIGH for obstructed, LOW for clear
|
||||
"D8" # D8 output for obstruction status, HIGH for obstructed, LOW for clear
|
||||
)
|
||||
CONF_RATGDO_ID = "ratgdo_id"
|
||||
|
||||
|
@ -44,28 +42,28 @@ CONFIG_SCHEMA = (
|
|||
cv.GenerateID(): cv.declare_id(RATGDO),
|
||||
cv.Optional(
|
||||
CONF_OUTPUT_GDO, default=DEFAULT_OUTPUT_GDO
|
||||
): pins.internal_gpio_input_pin_schema,
|
||||
): pins.gpio_output_pin_schema,
|
||||
cv.Optional(
|
||||
CONF_INPUT_GDO, default=DEFAULT_INPUT_GDO
|
||||
): pins.internal_gpio_input_pin_schema,
|
||||
): pins.gpio_input_pin_schema,
|
||||
cv.Optional(
|
||||
CONF_INPUT_OBST, default=DEFAULT_INPUT_OBST
|
||||
): pins.internal_gpio_input_pin_schema,
|
||||
): pins.gpio_input_pin_schema,
|
||||
cv.Optional(
|
||||
CONF_TRIGGER_OPEN, default=DEFAULT_TRIGGER_OPEN
|
||||
): pins.internal_gpio_input_pin_schema,
|
||||
): pins.gpio_input_pin_schema,
|
||||
cv.Optional(
|
||||
CONF_TRIGGER_CLOSE, default=DEFAULT_TRIGGER_CLOSE
|
||||
): pins.internal_gpio_input_pin_schema,
|
||||
): pins.gpio_input_pin_schema,
|
||||
cv.Optional(
|
||||
CONF_TRIGGER_LIGHT, default=DEFAULT_TRIGGER_LIGHT
|
||||
): pins.internal_gpio_input_pin_schema,
|
||||
): pins.gpio_input_pin_schema,
|
||||
cv.Optional(
|
||||
CONF_STATUS_DOOR, default=DEFAULT_STATUS_DOOR
|
||||
): pins.internal_gpio_input_pin_schema,
|
||||
): pins.gpio_output_pin_schema,
|
||||
cv.Optional(
|
||||
CONF_STATUS_OBST, default=DEFAULT_STATUS_OBST
|
||||
): pins.internal_gpio_input_pin_schema,
|
||||
): pins.gpio_output_pin_schema,
|
||||
}
|
||||
)
|
||||
.extend(cv.COMPONENT_SCHEMA)
|
||||
|
|
Loading…
Reference in New Issue