From d98edac48b4c8e6b314995148a18d225bbf290c3 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 10 Dec 2023 11:15:24 -0500 Subject: [PATCH] Fix bad copypasta conditional detections --- supersensor.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/supersensor.yaml b/supersensor.yaml index a1a16a9..57e8927 100644 --- a/supersensor.yaml +++ b/supersensor.yaml @@ -126,15 +126,15 @@ script: // Logical AND of pir & radar & light ESP_LOGD("occupancy_detect_handler", "PIR & Radar & Light: %i", pir & radar & light); id(supersensor_occupancy).publish_state(pir & radar & light); - } else if (pir_counts & radar_counts & light_counts) { + } else if (pir_counts & radar_counts) { // Logical AND of pir & radar ESP_LOGD("occupancy_detect_handler", "PIR & Radar: %i", pir & radar); id(supersensor_occupancy).publish_state(pir & radar); - } else if (pir_counts & radar_counts & light_counts) { + } else if (pir_counts & light_counts) { // Logical AND of pir & light ESP_LOGD("occupancy_detect_handler", "PIR & Light: %i", pir & light); id(supersensor_occupancy).publish_state(pir & light); - } else if (pir_counts & radar_counts & light_counts) { + } else if (radar_counts & light_counts) { // Logical AND of radar & light ESP_LOGD("occupancy_detect_handler", "Radar & Light: %i", radar & light); id(supersensor_occupancy).publish_state(radar & light); @@ -179,15 +179,15 @@ script: // Logical AND of pir & radar & light ESP_LOGD("occupancy_clear_handler", "PIR & Radar & Light: %i", pir & radar & light); id(supersensor_occupancy).publish_state(pir & radar & light); - } else if (pir_counts & radar_counts & light_counts) { + } else if (pir_counts & radar_counts) { // Logical AND of pir & radar ESP_LOGD("occupancy_clear_handler", "PIR & Radar: %i", pir & radar); id(supersensor_occupancy).publish_state(pir & radar); - } else if (pir_counts & radar_counts & light_counts) { + } else if (pir_counts & light_counts) { // Logical AND of pir & light ESP_LOGD("occupancy_clear_handler", "PIR & Light: %i", pir & light); id(supersensor_occupancy).publish_state(pir & light); - } else if (pir_counts & radar_counts & light_counts) { + } else if (radar_counts & light_counts) { // Logical AND of radar & light ESP_LOGD("occupancy_clear_handler", "Radar & Light: %i", radar & light); id(supersensor_occupancy).publish_state(radar & light);