mirror of
https://github.com/esphome/esphome.git
synced 2024-12-26 23:41:45 +01:00
Update ebyte_lora.cpp
This commit is contained in:
parent
3d54a9960b
commit
5d30d43612
1 changed files with 1 additions and 11 deletions
|
@ -165,17 +165,7 @@ void EbyteLoraComponent::loop() {
|
|||
}
|
||||
if (data[0] == SWITCH_INFO) {
|
||||
ESP_LOGD(TAG, "GOT INFO ", data.size());
|
||||
uint8_t i = 1;
|
||||
while (i < data.size() - 1) {
|
||||
for (auto *sensor : this->sensors_) {
|
||||
if (sensor->get_pin() == data[i]) {
|
||||
sensor->publish_state(data[i + 1]);
|
||||
}
|
||||
}
|
||||
ESP_LOGD(TAG, "PIN TO SET: %u ", data[i]);
|
||||
ESP_LOGD(TAG, "VALUE TO SET: %u ", data[i + 1]);
|
||||
i = +2;
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "RSSI: %u % ", (data[data.size() - 1] / 255.0) * 100);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue