diff --git a/changelog.md b/changelog.md index fb09ad3..be11d20 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Changelog +## Version 3.5.1 + Fixed: + - Fix: sendPowerSensorEvent sets factor even when specified. + ## Version 3.5.0 New: - Support Start/Stop and Open/Close capabilities. diff --git a/library.json b/library.json index e09adc5..5785d4b 100644 --- a/library.json +++ b/library.json @@ -18,7 +18,7 @@ } ], "homepage": "https://sinric.pro", - "version": "3.5.0", + "version": "3.5.1", "frameworks": "arduino", "platforms": ["espressif8266", "espressif32", "raspberrypi"], "dependencies": [ diff --git a/library.properties b/library.properties index 6e91728..d3cff44 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SinricPro -version=3.5.0 +version=3.5.1 author=Boris Jaeger maintainer=Boris Jaeger sentence=Library for https://sinric.pro - simple way to connect your device to alexa diff --git a/src/Capabilities/PowerSensor.h b/src/Capabilities/PowerSensor.h index f81057f..5f1bc94 100644 --- a/src/Capabilities/PowerSensor.h +++ b/src/Capabilities/PowerSensor.h @@ -59,7 +59,7 @@ bool PowerSensor::sendPowerSensorEvent(float voltage, float current, float po JsonObject event_value = eventMessage[FSTR_SINRICPRO_payload][FSTR_SINRICPRO_value]; if (power == -1) power = voltage * current; - if (apparentPower != -1) + if (factor == -1 && apparentPower != -1) factor = power / apparentPower; unsigned long currentTimestamp = device->getTimestamp(); diff --git a/src/SinricProVersion.h b/src/SinricProVersion.h index 6659c3e..7f6b1d0 100644 --- a/src/SinricProVersion.h +++ b/src/SinricProVersion.h @@ -6,7 +6,7 @@ // Version Configuration #define SINRICPRO_VERSION_MAJOR 3 #define SINRICPRO_VERSION_MINOR 5 -#define SINRICPRO_VERSION_REVISION 0 +#define SINRICPRO_VERSION_REVISION 1 #define SINRICPRO_VERSION STR(SINRICPRO_VERSION_MAJOR) "." STR(SINRICPRO_VERSION_MINOR) "." STR(SINRICPRO_VERSION_REVISION) #define SINRICPRO_VERSION_STR "SinricPro (v" SINRICPRO_VERSION ")" #define SINRICPRO_VERISON_INT SINRICPRO_VERSION_MAJOR * 1000000 + SINRICPRO_VERSION_MINOR * 1000 + SINRICPRO_VERSION_REVISION \ No newline at end of file