Skip to content

Commit

Permalink
Fix MaxPower functionality
Browse files Browse the repository at this point in the history
Fix MaxPower functionality (#7647)
  • Loading branch information
arendst committed Feb 9, 2020
1 parent 286a0c4 commit 504570d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Fix ``RGBWWTable`` ignored (#7572)
- Fix PWM flickering at low levels (#7415)
- Fix Hass sensor discovery part 1/4 by Federico Leoni (#7582, #7548)
- Fix MaxPower functionality (#7647)
- Add command ``SetOption79 0/1`` to enable reset of counters at teleperiod time by Andre Thomas (#7355)
- Add command ``SetOption82 0/1`` to limit the CT range for Alexa to 200..380
- Add command ``SetOption84 1`` to send AWS IoT device shadow updates (alternative to retained)
Expand All @@ -95,3 +96,4 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add support for sensors DS18x20 and DHT family on Shelly 1 and Shelly 1PM using Shelly Add-On adapter (#7469)
- Add support for MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683)
- Add BootCount Reset Time as BCResetTime to ``Status 1``
- Add ``ZbZNPReceived``and ``ZbZCLReceived`` being published to MQTT when ``SetOption66 1``
3 changes: 2 additions & 1 deletion tasmota/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
### 8.1.0.6 20200205

- Fix Hass sensor discovery part 1/4 by Federico Leoni (#7582, #7548)
- Fix MaxPower functionality (#7647)
- Add support for sensors DS18x20 and DHT family on Shelly 1 and Shelly 1PM using Shelly Add-On adapter (#7469)
- Add commands ``SwitchMode 11`` PushHoldMulti and ``SwitchMode 12`` PushHoldInverted (#7603)
- Add command ``Buzzer -1`` for infinite mode and command ``Buzzer -2`` for following led mode (#7623)
- Add support for MI-BLE sensors using HM-10 Bluetooth 4.0 module by Christian Staars (#7683)
- Add BootCount Reset Time as BCResetTime to ``Status 1``
- Add ``ZbZNPReceived``and ``ZbZCLReceived``are published to MQTT when ``SetOption66 1``
- Add ``ZbZNPReceived``and ``ZbZCLReceived`` being published to MQTT when ``SetOption66 1``

### 8.1.0.5 20200126

Expand Down
3 changes: 2 additions & 1 deletion tasmota/support_tasmota.ino
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ void SetDevicePower(power_t rpower, uint32_t source)
void RestorePower(bool publish_power, uint32_t source)
{
if (power != last_power) {
SetDevicePower(last_power, source);
power = last_power;
SetDevicePower(power, source);
if (publish_power) {
MqttPublishAllPowerState();
}
Expand Down
3 changes: 2 additions & 1 deletion tasmota/xdrv_03_energy.ino
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ void EnergyMarginCheck(void)
EnergyMqttShow();
SetAllPower(POWER_ALL_OFF, SRC_MAXPOWER);
if (!Energy.mplr_counter) {
Energy.mplr_counter = Settings.param[P_MAX_POWER_RETRY] +1;
Energy.mplr_counter = Settings.param[P_MAX_POWER_RETRY] +1; // SetOption33 - Max Power Retry count
}
Energy.mplw_counter = Settings.energy_max_power_limit_window;
}
Expand All @@ -390,6 +390,7 @@ void EnergyMarginCheck(void)
ResponseTime_P(PSTR(",\"" D_JSON_MAXPOWERREACHEDRETRY "\":\"%s\"}"), GetStateText(0));
MqttPublishPrefixTopic_P(STAT, S_RSLT_WARNING);
EnergyMqttShow();
SetAllPower(POWER_ALL_OFF, SRC_MAXPOWER);
}
}
}
Expand Down

0 comments on commit 504570d

Please sign in to comment.