mirror of https://github.com/esphome/esphome.git
fix formatting
This commit is contained in:
parent
bbb4e397bf
commit
ceae0cacab
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue