Skip to content

Commit

Permalink
fix output status
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo-deluca committed Apr 17, 2024
1 parent 8ad8c98 commit 93f7c66
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions components/bentel-kyo/bentel_kyo32.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,12 @@ class Bentel_Kyo32 : public esphome::PollingComponent, public uart::UARTDevice,
ESP_LOGI("stato_sirena", "Stato %i", StatoZona);
stato_sirena->publish_state(StatoZona == 1);

if (alarmModel == AlarmModel::KYO_32)
if (alarmModel == AlarmModel::KYO_32G)
{
// CICLO STATO USCITE
for (i = 0; i < KYO_MAX_USCITE; i++)
{
StatoZona = 0;
if (i >= 8 && i <= 15)
StatoZona = (Rx[11] >> (i - 8)) & 1;
else if (i <= 7)
StatoZona = (Rx[12] >> i) & 1;

StatoZona = (Rx[12] >> i) & 1;
if (this->logTrace && (StatoZona == 1) != stato_uscita[i].state)
ESP_LOGI("stato_uscita", "Uscita %i - Stato %i", i, StatoZona);

Expand Down

0 comments on commit 93f7c66

Please sign in to comment.