mirror of
https://github.com/esphome/esphome.git
synced 2024-12-27 16:01:43 +01:00
And this
This commit is contained in:
parent
4c4ff0cfb9
commit
c2683f24dd
1 changed files with 24 additions and 19 deletions
|
@ -152,6 +152,10 @@ void EbyteLoraComponent::loop() {
|
|||
ESP_LOGD(TAG, "GOT INFO ", data.size());
|
||||
uint8_t i = 1;
|
||||
while (i < data.size()) {
|
||||
for (auto *sensor : this->sensors_) {
|
||||
if (sensor->get_pin() == data[i]) {
|
||||
sensor->publish_state(data[i + 1]);
|
||||
}
|
||||
ESP_LOGD(TAG, "PIN: %u ", data[i]);
|
||||
ESP_LOGD(TAG, "VALUE: %u ", data[i + 1]);
|
||||
i = +2;
|
||||
|
@ -174,6 +178,7 @@ void EbyteLoraComponent::loop() {
|
|||
}
|
||||
send_switch_info_();
|
||||
}
|
||||
}
|
||||
}
|
||||
void EbyteLoraComponent::send_switch_info_() {
|
||||
if (!EbyteLoraComponent::can_send_message_()) {
|
||||
|
|
Loading…
Reference in a new issue