Add command ``Status0`` providing all status in one line

This commit is contained in:
Theo Arends 2021-06-02 18:13:05 +02:00
parent 4d2ac90bf1
commit 25f4070da2
3 changed files with 4 additions and 5 deletions

View File

@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Added
- Version bump to signal new features to Hass
- Support for BM8563 RTC chip (I2C) found in M5Stack Core2 and M5StickC
- Command ``Status0`` providing all status in one line
### Changed
- IRremoteESP8266 library from v2.7.16 to v2.7.18

View File

@ -78,6 +78,7 @@ The binaries can be downloaded from either https://github.com/arendst/Tasmota/tr
## Changelog v9.4.0.4
### Added
- Command ``Status0`` providing all status in one line
- Initial support for optional ``Template`` JSON fieldpair ``"CMND":"<any template related command>|<any template related command>|..."`` [#11788](https://github.com/arendst/Tasmota/issues/11788)
- ESP32 pulldown buttons ``Button_d`` and ``Button_id`` and switches ``Switch_d`` [#10814](https://github.com/arendst/Tasmota/issues/10814)
- Support for MQTT using Azure IoT Hub by Kevin Saye [#11906](https://github.com/arendst/Tasmota/issues/11906)

View File

@ -409,12 +409,10 @@ void CmndPower(void)
}
}
bool all_in_one = false;
void CmndStatusResponse(uint32_t index) {
static String all_status = (const char*) nullptr;
if (all_in_one) {
if (0 == XdrvMailbox.index) {
if (99 == index) {
all_status.replace("}{", ",");
char cmnd_status[10]; // STATUS11
@ -439,8 +437,7 @@ void CmndStatus(void)
{
int32_t payload = XdrvMailbox.payload;
all_in_one = (0 == XdrvMailbox.index);
if (all_in_one) { payload = 0; }
if (0 == XdrvMailbox.index) { payload = 0; } // All status messages in one MQTT message (status0)
if (payload > MAX_STATUS) { return; } // {"Command":"Error"}
if (!Settings.flag.mqtt_enabled && (6 == payload)) { return; } // SetOption3 - Enable MQTT