From ceae0cacab54db904ac3b9b42a3234f89975eb85 Mon Sep 17 00:00:00 2001 From: erikveg Date: Thu, 2 May 2024 09:57:06 +0000 Subject: [PATCH] fix formatting --- esphome/components/ain4_20ma/ain4_20ma.cpp | 4 ++-- esphome/components/ain4_20ma/ain4_20ma.h | 4 ++-- esphome/components/ain4_20ma/sensor.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/esphome/components/ain4_20ma/ain4_20ma.cpp b/esphome/components/ain4_20ma/ain4_20ma.cpp index 24d94d7552..0b256523d7 100644 --- a/esphome/components/ain4_20ma/ain4_20ma.cpp +++ b/esphome/components/ain4_20ma/ain4_20ma.cpp @@ -2,7 +2,7 @@ #include "esphome/core/log.h" namespace esphome { -namespace ain420ma { +namespace ain4_20ma { static const char *const TAG = "ain4_20ma"; @@ -27,5 +27,5 @@ void Ain420maComponent::update() { } } -} // namespace ain420ma +} // namespace ain4_20ma } // namespace esphome diff --git a/esphome/components/ain4_20ma/ain4_20ma.h b/esphome/components/ain4_20ma/ain4_20ma.h index d8ef7ab690..5bb04ade17 100644 --- a/esphome/components/ain4_20ma/ain4_20ma.h +++ b/esphome/components/ain4_20ma/ain4_20ma.h @@ -5,7 +5,7 @@ #include "esphome/components/i2c/i2c.h" namespace esphome { -namespace ain420ma { +namespace ain4_20ma { class Ain420maComponent : public i2c::I2CDevice, public PollingComponent, public sensor::Sensor { public: @@ -14,5 +14,5 @@ class Ain420maComponent : public i2c::I2CDevice, public PollingComponent, public void update() override; }; -} // namespace ain420ma +} // namespace ain4_20ma } // namespace esphome diff --git a/esphome/components/ain4_20ma/sensor.py b/esphome/components/ain4_20ma/sensor.py index ad957bfad4..cb58398960 100644 --- a/esphome/components/ain4_20ma/sensor.py +++ b/esphome/components/ain4_20ma/sensor.py @@ -10,13 +10,13 @@ DEPENDENCIES = ["i2c"] ain4_20ma_ns = cg.esphome_ns.namespace("ain4_20ma") -Ain4_20maComponent = ain4_20ma_ns.class_( - "Ain4_20maComponent", cg.PollingComponent, i2c.I2CDevice, sensor.Sensor +Ain420maComponent = ain4_20ma_ns.class_( + "Ain420maComponent", cg.PollingComponent, i2c.I2CDevice, sensor.Sensor ) CONFIG_SCHEMA = ( sensor.sensor_schema( - Ain4_20maComponent, + Ain420maComponent, unit_of_measurement="mA", accuracy_decimals=3, device_class=DEVICE_CLASS_CURRENT,