From f07ea6dcdabcde8d62ad14cd59f3a85710c12db5 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Fri, 10 Nov 2023 16:30:15 +1300 Subject: [PATCH] Add raw bus voltage log --- esphome/components/ina226/ina226.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/esphome/components/ina226/ina226.cpp b/esphome/components/ina226/ina226.cpp index 1fb859da66..70013e360d 100644 --- a/esphome/components/ina226/ina226.cpp +++ b/esphome/components/ina226/ina226.cpp @@ -1,7 +1,7 @@ #include "ina226.h" -#include "esphome/core/log.h" -#include "esphome/core/hal.h" #include +#include "esphome/core/hal.h" +#include "esphome/core/log.h" namespace esphome { namespace ina226 { @@ -102,6 +102,7 @@ void INA226Component::update() { this->status_set_warning(); return; } + ESP_LOGD(TAG, "Got raw bus voltage: %d", raw_bus_voltage); float bus_voltage_v = int16_t(raw_bus_voltage) * 0.00125f; this->bus_voltage_sensor_->publish_state(bus_voltage_v); }