--- external_components: - source: type: git url: https://github.com/ratgdo/esphome-ratgdo ref: ratgdo32 refresh: 1s # - source: # type: local # path: components safe_mode: preferences: flash_write_interval: 1min text_sensor: - platform: version name: "Firmware Version" ratgdo: id: ${id_prefix} output_gdo_pin: ${uart_tx_pin} input_gdo_pin: ${uart_rx_pin} input_obst_pin: ${input_obst_pin} dry_contact_open_sensor: ${id_prefix}_dry_contact_open dry_contact_close_sensor: ${id_prefix}_dry_contact_close discrete_open_pin: ${discrete_open_pin} discrete_close_pin: ${discrete_close_pin} protocol: drycontact ota: - platform: esphome id: ratgdo_ota binary_sensor: - platform: ratgdo type: obstruction id: ${id_prefix}_obstruction ratgdo_id: ${id_prefix} name: "Obstruction" device_class: problem - platform: gpio id: "${id_prefix}_dry_contact_open" pin: number: ${dry_contact_open_pin} inverted: true mode: input: true pullup: true name: "Open limit switch" entity_category: diagnostic filters: - delayed_on_off: 500ms - platform: gpio id: "${id_prefix}_dry_contact_close" pin: number: ${dry_contact_close_pin} inverted: true mode: input: true pullup: true name: "Close limit switch" entity_category: diagnostic filters: - delayed_on_off: 500ms number: - platform: ratgdo id: ${id_prefix}_opening_duration type: opening_duration entity_category: config ratgdo_id: ${id_prefix} name: "Opening duration" unit_of_measurement: "s" - platform: ratgdo id: ${id_prefix}_closing_duration type: closing_duration entity_category: config ratgdo_id: ${id_prefix} name: "Closing duration" unit_of_measurement: "s" cover: - platform: ratgdo id: ${id_prefix}_garage_door device_class: garage name: "Door" ratgdo_id: ${id_prefix} button: - platform: restart id: ${id_prefix}_restart name: "Restart" - platform: safe_mode id: ${id_prefix}_safe_mode name: "Safe mode boot" entity_category: diagnostic - platform: template id: ${id_prefix}_toggle_door name: "Toggle door" on_press: then: lambda: !lambda |- id($id_prefix).door_toggle();