From 86056fcd41b44afb0f74b83aed1a259288ba8143 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 5 Jun 2023 18:54:37 -0500 Subject: [PATCH] fix --- components/ratgdo/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/components/ratgdo/__init__.py b/components/ratgdo/__init__.py index 550aaec..efeebcc 100644 --- a/components/ratgdo/__init__.py +++ b/components/ratgdo/__init__.py @@ -23,29 +23,28 @@ CONF_TRIGGER_CLOSE = "trigger_close_pin" DEFAULT_TRIGGER_CLOSE = 12 # 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) + CONF_STATUS_DOOR = "status_door_pin" DEFAULT_STATUS_DOOR = 16 # 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 -CONF_INPUT_RPM1 = "input_rpm1_pin" -DEFAULT_INPUT_RPM1 = 5 # D1 RPM1 rotary encoder input OR reed switch if not soldering to the door opener logic board -CONF_INPUT_RPM2 = "input_rpm2_pin" -DEFAULT_INPUT_RPM2 = 4 # D2 RPM2 rotary encoder input OR not used if using reed switch + CONFIG_SCHEMA = cv.Schema( { cv.GenerateID(): cv.declare_id(RATGDO), + cv.Optional(CONF_OUTPUT_GDO, default=DEFAULT_OUTPUT_GDO): pins.internal_gpio_input_pin_schema, cv.Optional(CONF_INPUT_GDO, default=DEFAULT_INPUT_GDO): pins.internal_gpio_input_pin_schema, + cv.Optional(CONF_INPUT_OBST, default=DEFAULT_INPUT_OBST): pins.internal_gpio_input_pin_schema, + cv.Optional(CONF_TRIGGER_OPEN, default=DEFAULT_TRIGGER_OPEN): pins.internal_gpio_input_pin_schema, cv.Optional(CONF_TRIGGER_CLOSE, default=DEFAULT_TRIGGER_CLOSE): pins.internal_gpio_input_pin_schema, cv.Optional(CONF_TRIGGER_LIGHT, default=DEFAULT_TRIGGER_LIGHT): pins.internal_gpio_input_pin_schema, + cv.Optional(CONF_STATUS_DOOR, default=DEFAULT_STATUS_DOOR): pins.internal_gpio_input_pin_schema, cv.Optional(CONF_STATUS_OBST, default=DEFAULT_STATUS_OBST): pins.internal_gpio_input_pin_schema, - cv.Optional(CONF_INPUT_RPM1, default=DEFAULT_INPUT_RPM1): pins.internal_gpio_input_pin_schema, - cv.Optional(CONF_INPUT_RPM2, default=DEFAULT_INPUT_RPM2): pins.internal_gpio_input_pin_schema, - cv.Optional(CONF_INPUT_OBST, default=DEFAULT_INPUT_OBST): pins.internal_gpio_input_pin_schema, } ).extend(cv.COMPONENT_SCHEMA)