mirror of
https://github.com/geoffdavis/esphome-mitsubishiheatpump
synced 2024-08-30 18:12:13 +00:00
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:
parent
4dcf811024
commit
b7d6d0dda3
5
espmhp.h
5
espmhp.h
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user