Compare commits

..

2 Commits

Author SHA1 Message Date
Kevin P. Fleming ac5b70c6c5
Merge 16316fdbe5 into f9590d94ad 2024-04-29 06:19:36 -04:00
Kevin P. Fleming 16316fdbe5 Improve compatibility for non-dry-contact configurations.
* Don't compile any dry-contact code unless PROTOCOL_DRYCONTACT is defined.

* Use BinarySensor instead of GPIOBinarySensor to allow the user to use a
  template binary sensor (or any other type) if they wish.
2024-04-29 06:19:28 -04:00
2 changed files with 4 additions and 2 deletions

View File

@ -1,9 +1,9 @@
#include "ratgdo.h"
#ifdef PROTOCOL_DRYCONTACT
#include "dry_contact.h"
#include "ratgdo.h"
#include "esphome/core/gpio.h"
#include "esphome/core/log.h"
#include "esphome/core/scheduler.h"

View File

@ -1,5 +1,7 @@
#pragma once
#include "esphome/core/defines.h"
#ifdef PROTOCOL_DRYCONTACT
#include "SoftwareSerial.h" // Using espsoftwareserial https://github.com/plerup/espsoftwareserial