Fix Shelly Pro detection when using buttons (#16733)

This commit is contained in:
Theo Arends 2022-10-31 14:01:15 +01:00
parent 817819e603
commit 9db8a23401

View File

@ -64,9 +64,9 @@ void ShellyProPreInit(void) {
PinUsed(GPIO_SPI_CS) &&
TasmotaGlobal.gpio_optiona.shelly_pro) { // Option_A7
if (PinUsed(GPIO_SWT1)) {
if (PinUsed(GPIO_SWT1) || PinUsed(GPIO_KEY1)) {
TasmotaGlobal.devices_present++; // Shelly Pro 1
if (PinUsed(GPIO_SWT1, 1)) {
if (PinUsed(GPIO_SWT1, 1) || PinUsed(GPIO_KEY1, 1)) {
TasmotaGlobal.devices_present++; // Shelly Pro 2
}