diff --git a/esphome/components/adc/adc_sensor.h b/esphome/components/adc/adc_sensor.h index e44d3ee8d7..7d26a67ae4 100644 --- a/esphome/components/adc/adc_sensor.h +++ b/esphome/components/adc/adc_sensor.h @@ -12,8 +12,7 @@ namespace adc { ADC_MODE(ADC_VCC) #endif -class ADCSensor : public sensor::Sensor, public PollingComponent, - public voltage_sampler::VoltageSampler { +class ADCSensor : public sensor::Sensor, public PollingComponent, public voltage_sampler::VoltageSampler { public: #ifdef ARDUINO_ARCH_ESP32 /// Set the attenuation for this pin. Only available on the ESP32. diff --git a/esphome/components/ads1115/ads1115.cpp b/esphome/components/ads1115/ads1115.cpp index 924cd1e3e4..94ff3a1186 100644 --- a/esphome/components/ads1115/ads1115.cpp +++ b/esphome/components/ads1115/ads1115.cpp @@ -59,9 +59,7 @@ void ADS1115Component::setup() { } for (auto *sensor : this->sensors_) { this->set_interval(sensor->get_name(), sensor->update_interval(), - [this, sensor] { - this->request_measurement(sensor); - }); + [this, sensor] { this->request_measurement(sensor); }); } } void ADS1115Component::dump_config() { @@ -153,9 +151,7 @@ uint8_t ADS1115Sensor::get_multiplexer() const { return this->multiplexer_; } void ADS1115Sensor::set_multiplexer(ADS1115Multiplexer multiplexer) { this->multiplexer_ = multiplexer; } uint8_t ADS1115Sensor::get_gain() const { return this->gain_; } void ADS1115Sensor::set_gain(ADS1115Gain gain) { this->gain_ = gain; } -float ADS1115Sensor::sample() { - return this->parent_->request_measurement(this); -} +float ADS1115Sensor::sample() { return this->parent_->request_measurement(this); } void ADS1115Sensor::update() { float v = this->parent_->request_measurement(this); if (!isnan(v)) { diff --git a/esphome/components/ads1115/ads1115.h b/esphome/components/ads1115/ads1115.h index f9d00f9b19..966541ef4f 100644 --- a/esphome/components/ads1115/ads1115.h +++ b/esphome/components/ads1115/ads1115.h @@ -47,8 +47,7 @@ class ADS1115Component : public Component, public i2c::I2CDevice { }; /// Internal holder class that is in instance of Sensor so that the hub can create individual sensors. -class ADS1115Sensor : public sensor::Sensor, public PollingComponent, - public voltage_sampler::VoltageSampler { +class ADS1115Sensor : public sensor::Sensor, public PollingComponent, public voltage_sampler::VoltageSampler { public: ADS1115Sensor(ADS1115Component *parent) : parent_(parent) {} void update() override; diff --git a/esphome/components/ble_presence/ble_presence_device.h b/esphome/components/ble_presence/ble_presence_device.h index 04152d7695..262cc3eedf 100644 --- a/esphome/components/ble_presence/ble_presence_device.h +++ b/esphome/components/ble_presence/ble_presence_device.h @@ -13,9 +13,7 @@ class BLEPresenceDevice : public binary_sensor::BinarySensor, public esp32_ble_tracker::ESPBTDeviceListener, public Component { public: - void set_address(uint64_t address) { - address_ = address; - } + void set_address(uint64_t address) { address_ = address; } void on_scan_end() override { if (!this->found_) this->publish_state(false); diff --git a/esphome/components/ble_rssi/ble_rssi_sensor.h b/esphome/components/ble_rssi/ble_rssi_sensor.h index 633bf1e52f..2c296b3831 100644 --- a/esphome/components/ble_rssi/ble_rssi_sensor.h +++ b/esphome/components/ble_rssi/ble_rssi_sensor.h @@ -11,9 +11,7 @@ namespace ble_rssi { class BLERSSISensor : public sensor::Sensor, public esp32_ble_tracker::ESPBTDeviceListener, public Component { public: - void set_address(uint64_t address) { - address_ = address; - } + void set_address(uint64_t address) { address_ = address; } void on_scan_end() override { if (!this->found_) this->publish_state(NAN); diff --git a/esphome/components/time/real_time_clock.h b/esphome/components/time/real_time_clock.h index f416938717..b87636d20e 100644 --- a/esphome/components/time/real_time_clock.h +++ b/esphome/components/time/real_time_clock.h @@ -100,19 +100,13 @@ class RealTimeClock : public Component { std::string get_timezone() { return this->timezone_; } /// Get the time in the currently defined timezone. - ESPTime now() { - return ESPTime::from_epoch_utc(this->timestamp_now()); - } + ESPTime now() { return ESPTime::from_epoch_utc(this->timestamp_now()); } /// Get the time without any time zone or DST corrections. - ESPTime utcnow() { - return ESPTime::from_epoch_local(this->timestamp_now()); - } + ESPTime utcnow() { return ESPTime::from_epoch_local(this->timestamp_now()); } /// Get the current time as the UTC epoch since January 1st 1970. - time_t timestamp_now() { - return ::time(nullptr); - } + time_t timestamp_now() { return ::time(nullptr); } void call_setup() override; diff --git a/esphome/components/xiaomi_miflora/xiaomi_miflora.h b/esphome/components/xiaomi_miflora/xiaomi_miflora.h index 7a1459b3b9..d1f05cdcc7 100644 --- a/esphome/components/xiaomi_miflora/xiaomi_miflora.h +++ b/esphome/components/xiaomi_miflora/xiaomi_miflora.h @@ -12,9 +12,7 @@ namespace xiaomi_miflora { class XiaomiMiflora : public Component, public esp32_ble_tracker::ESPBTDeviceListener { public: - void set_address(uint64_t address) { - address_ = address; - } + void set_address(uint64_t address) { address_ = address; } bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override { if (device.address_uint64() != this->address_) diff --git a/esphome/components/xiaomi_mijia/xiaomi_mijia.h b/esphome/components/xiaomi_mijia/xiaomi_mijia.h index 6ed066f3be..814e33fa75 100644 --- a/esphome/components/xiaomi_mijia/xiaomi_mijia.h +++ b/esphome/components/xiaomi_mijia/xiaomi_mijia.h @@ -12,9 +12,7 @@ namespace xiaomi_mijia { class XiaomiMijia : public Component, public esp32_ble_tracker::ESPBTDeviceListener { public: - void set_address(uint64_t address) { - address_ = address; - } + void set_address(uint64_t address) { address_ = address; } bool parse_device(const esp32_ble_tracker::ESPBTDevice &device) override { if (device.address_uint64() != this->address_)