Update sonoff.ino

This commit is contained in:
Theo Arends 2018-12-06 11:01:57 +01:00 committed by GitHub
parent 94786d3217
commit e64c8d61c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1311,7 +1311,7 @@ boolean SendKey(byte key, byte device, byte state)
if (Settings.flag.mqtt_enabled && MqttIsConnected() && (strlen(key_topic) != 0) && strcmp(key_topic, "0")) {
if (!key && (device > devices_present)) device = 1; // Only allow number of buttons up to number of devices
GetTopic_P(stopic, CMND, key_topic, GetPowerDevice(scommand, device, sizeof(scommand),
Settings.flag.device_index_enable)); // cmnd/switchtopic/POWERx
(key + Settings.flag.device_index_enable))); // cmnd/switchtopic/POWERx
if (9 == state) {
mqtt_data[0] = '\0';
} else {