Use callbacks, update more frequenly.

Callbacks appear to be working now that variables are initialized in the
HeatPump library.

With callbacks enabled, we can poll more often.
This commit is contained in:
Geoff Davis 2020-03-18 07:29:30 -07:00
parent 4dcf811024
commit b7d6d0dda3

View File

@ -12,8 +12,7 @@
* - ESPHome 1.15.0-dev or greater
*/
// Uncomment to use HeatPump callback functions (broken, causes boot failures)
//#define USE_CALLBACKS
#define USE_CALLBACKS
#include "esphome.h"
#include "HeatPump.h"
@ -28,7 +27,7 @@ static const char* ESPMHP_VERSION = "1.0.2";
/* If polling interval is greater than 9 seconds, the HeatPump
library reconnects, but doesn't then follow up with our data request.*/
static const uint32_t ESPMHP_POLL_INTERVAL_DEFAULT = 2000; // in milliseconds,
static const uint32_t ESPMHP_POLL_INTERVAL_DEFAULT = 500; // in milliseconds,
// 0 < X <= 9000
static const uint8_t ESPMHP_MIN_TEMPERATURE = 16; // degrees C,
// defined by hardware