From faa52b9cc0b35b6f3973b7ddc551abde0a81bc66 Mon Sep 17 00:00:00 2001 From: Robin Thoni Date: Mon, 24 Jun 2024 08:32:20 +0000 Subject: [PATCH] Enable addidtional distance and SNR uart outputs --- esphome/components/dfrobot_sen0395/automation.h | 1 + .../components/dfrobot_sen0395/switch/dfrobot_sen0395_switch.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/esphome/components/dfrobot_sen0395/automation.h b/esphome/components/dfrobot_sen0395/automation.h index 3f69e482b7..f1d70b3db1 100644 --- a/esphome/components/dfrobot_sen0395/automation.h +++ b/esphome/components/dfrobot_sen0395/automation.h @@ -69,6 +69,7 @@ class DfrobotSen0395SettingsAction : public Action, public Parentedpresence_via_uart_.value(x...); if (val >= 0) { this->parent_->enqueue(make_unique(val)); + this->parent_->enqueue(make_unique(2, val)); } } if (this->sensitivity_.has_value()) { diff --git a/esphome/components/dfrobot_sen0395/switch/dfrobot_sen0395_switch.cpp b/esphome/components/dfrobot_sen0395/switch/dfrobot_sen0395_switch.cpp index ca72d94531..d40a14ae5c 100644 --- a/esphome/components/dfrobot_sen0395/switch/dfrobot_sen0395_switch.cpp +++ b/esphome/components/dfrobot_sen0395/switch/dfrobot_sen0395_switch.cpp @@ -25,6 +25,7 @@ void Sen0395UartPresenceSwitch::write_state(bool state) { this->parent_->enqueue(make_unique(false)); } this->parent_->enqueue(make_unique(state)); + this->parent_->enqueue(make_unique(2, state)); this->parent_->enqueue(make_unique()); if (was_active) { this->parent_->enqueue(make_unique(true));