fix formatting

This commit is contained in:
erikveg 2024-05-02 09:57:06 +00:00
parent bbb4e397bf
commit ceae0cacab
3 changed files with 7 additions and 7 deletions

View File

@ -2,7 +2,7 @@
#include "esphome/core/log.h" #include "esphome/core/log.h"
namespace esphome { namespace esphome {
namespace ain420ma { namespace ain4_20ma {
static const char *const TAG = "ain4_20ma"; static const char *const TAG = "ain4_20ma";
@ -27,5 +27,5 @@ void Ain420maComponent::update() {
} }
} }
} // namespace ain420ma } // namespace ain4_20ma
} // namespace esphome } // namespace esphome

View File

@ -5,7 +5,7 @@
#include "esphome/components/i2c/i2c.h" #include "esphome/components/i2c/i2c.h"
namespace esphome { namespace esphome {
namespace ain420ma { namespace ain4_20ma {
class Ain420maComponent : public i2c::I2CDevice, public PollingComponent, public sensor::Sensor { class Ain420maComponent : public i2c::I2CDevice, public PollingComponent, public sensor::Sensor {
public: public:
@ -14,5 +14,5 @@ class Ain420maComponent : public i2c::I2CDevice, public PollingComponent, public
void update() override; void update() override;
}; };
} // namespace ain420ma } // namespace ain4_20ma
} // namespace esphome } // namespace esphome

View File

@ -10,13 +10,13 @@ DEPENDENCIES = ["i2c"]
ain4_20ma_ns = cg.esphome_ns.namespace("ain4_20ma") ain4_20ma_ns = cg.esphome_ns.namespace("ain4_20ma")
Ain4_20maComponent = ain4_20ma_ns.class_( Ain420maComponent = ain4_20ma_ns.class_(
"Ain4_20maComponent", cg.PollingComponent, i2c.I2CDevice, sensor.Sensor "Ain420maComponent", cg.PollingComponent, i2c.I2CDevice, sensor.Sensor
) )
CONFIG_SCHEMA = ( CONFIG_SCHEMA = (
sensor.sensor_schema( sensor.sensor_schema(
Ain4_20maComponent, Ain420maComponent,
unit_of_measurement="mA", unit_of_measurement="mA",
accuracy_decimals=3, accuracy_decimals=3,
device_class=DEVICE_CLASS_CURRENT, device_class=DEVICE_CLASS_CURRENT,