mirror of
https://github.com/esphome/esphome.git
synced 2026-05-10 05:37:55 +08:00
[clang-tidy] Concatenate nested namespaces (4/7: components n-r) (#16301)
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nau7802 {
|
||||
namespace esphome::nau7802 {
|
||||
|
||||
static const char *const TAG = "nau7802";
|
||||
|
||||
@@ -313,5 +312,4 @@ void NAU7802Sensor::update() {
|
||||
|
||||
bool NAU7802Sensor::is_data_ready_() { return this->reg(PU_CTRL_REG).get() & PU_CTRL_CYCLE_READY; }
|
||||
|
||||
} // namespace nau7802
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nau7802
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace nau7802 {
|
||||
namespace esphome::nau7802 {
|
||||
|
||||
enum NAU7802Gain {
|
||||
NAU7802_GAIN_128 = 0b111,
|
||||
@@ -114,5 +113,4 @@ template<typename... Ts> class NAU7802CalbrateGainAction : public Action<Ts...>,
|
||||
void play(const Ts &...x) override { this->parent_->calibrate_gain(); }
|
||||
};
|
||||
|
||||
} // namespace nau7802
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nau7802
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#include "automation.h"
|
||||
#include "nfc.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
void NfcOnTagTrigger::process(const std::unique_ptr<NfcTag> &tag) {
|
||||
char uid_buf[FORMAT_UID_BUFFER_SIZE];
|
||||
this->trigger(std::string(format_uid_to(uid_buf, tag->get_uid())), *tag);
|
||||
}
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -5,13 +5,11 @@
|
||||
|
||||
#include "nfc.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
class NfcOnTagTrigger : public Trigger<std::string, NfcTag> {
|
||||
public:
|
||||
void process(const std::unique_ptr<NfcTag> &tag);
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "../nfc_helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char *const TAG = "nfc.binary_sensor";
|
||||
|
||||
@@ -112,5 +111,4 @@ void NfcTagBinarySensor::tag_on(NfcTag &tag) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
class NfcTagBinarySensor : public binary_sensor::BinarySensor,
|
||||
public Component,
|
||||
@@ -34,5 +33,4 @@ class NfcTagBinarySensor : public binary_sensor::BinarySensor,
|
||||
NfcTagUid uid_;
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
// Header info
|
||||
static constexpr uint8_t NCI_PKT_HEADER_SIZE = 3; // NCI packet (pkt) headers are always three bytes
|
||||
@@ -140,5 +139,4 @@ static constexpr uint8_t RF_INTF_ACTIVATED_NTF_INIT_CRED = 5 + NCI_PKT_HEADER_SI
|
||||
static constexpr uint8_t RF_INTF_ACTIVATED_NTF_RF_TECH_LENGTH = 6 + NCI_PKT_HEADER_SIZE;
|
||||
static constexpr uint8_t RF_INTF_ACTIVATED_NTF_RF_TECH_PARAMS = 7 + NCI_PKT_HEADER_SIZE;
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char *const TAG = "NciMessage";
|
||||
|
||||
@@ -162,5 +161,4 @@ void NciMessage::set_payload(const std::vector<uint8_t> &payload) {
|
||||
this->nci_message_ = message;
|
||||
}
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
class NciMessage {
|
||||
public:
|
||||
@@ -46,5 +45,4 @@ class NciMessage {
|
||||
std::vector<uint8_t> nci_message_{0, 0, 0}; // three bytes, MT/PBF/GID, OID, payload length/size
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "ndef_message.h"
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char *const TAG = "nfc.ndef_message";
|
||||
|
||||
@@ -120,5 +119,4 @@ std::vector<uint8_t> NdefMessage::encode() {
|
||||
return data;
|
||||
}
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
#include "ndef_record_text.h"
|
||||
#include "ndef_record_uri.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static constexpr uint8_t MAX_NDEF_RECORDS = 4;
|
||||
|
||||
@@ -38,5 +37,4 @@ class NdefMessage {
|
||||
std::vector<std::shared_ptr<NdefRecord>> records_;
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "ndef_record.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char *const TAG = "nfc.ndef_record";
|
||||
|
||||
@@ -61,5 +60,4 @@ uint8_t NdefRecord::create_flag_byte(bool first, bool last, size_t payload_size)
|
||||
return value;
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static constexpr uint8_t TNF_EMPTY = 0x00;
|
||||
static constexpr uint8_t TNF_WELL_KNOWN = 0x01;
|
||||
@@ -53,5 +52,4 @@ class NdefRecord {
|
||||
std::string payload_;
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "ndef_record_text.h"
|
||||
#include "ndef_record.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char *const TAG = "nfc.ndef_record_text";
|
||||
|
||||
@@ -41,5 +40,4 @@ std::vector<uint8_t> NdefRecordText::get_encoded_payload() {
|
||||
return data;
|
||||
}
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
class NdefRecordText : public NdefRecord {
|
||||
public:
|
||||
@@ -39,5 +38,4 @@ class NdefRecordText : public NdefRecord {
|
||||
std::string language_code_;
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "ndef_record_uri.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char *const TAG = "nfc.ndef_record_uri";
|
||||
|
||||
@@ -44,5 +43,4 @@ std::vector<uint8_t> NdefRecordUri::get_encoded_payload() {
|
||||
return data;
|
||||
}
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static constexpr uint8_t PAYLOAD_IDENTIFIERS_COUNT = 0x23;
|
||||
static const char *const PAYLOAD_IDENTIFIERS[] = {"",
|
||||
@@ -74,5 +73,4 @@ class NdefRecordUri : public NdefRecord {
|
||||
std::string uri_;
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char *const TAG = "nfc";
|
||||
|
||||
@@ -108,5 +107,4 @@ bool mifare_classic_is_trailer_block(uint8_t block_num) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
#include <span>
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static constexpr uint8_t MIFARE_CLASSIC_BLOCK_SIZE = 16;
|
||||
static constexpr uint8_t MIFARE_CLASSIC_LONG_TLV_SIZE = 4;
|
||||
@@ -95,5 +94,4 @@ class Nfcc {
|
||||
std::vector<NfcTagListener *> tag_listeners_;
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "nfc_helpers.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char *const TAG = "nfc.helpers";
|
||||
|
||||
@@ -43,5 +42,4 @@ std::string get_random_ha_tag_ndef() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "nfc_tag.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char HA_TAG_ID_EXT_RECORD_TYPE[] = "android.com:pkg";
|
||||
static const char HA_TAG_ID_EXT_RECORD_PAYLOAD[] = "io.homeassistant.companion.android";
|
||||
@@ -13,5 +12,4 @@ std::string get_ha_tag_ndef(NfcTag &tag);
|
||||
std::string get_random_ha_tag_ndef();
|
||||
bool has_ha_tag_ndef(NfcTag &tag);
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "nfc_tag.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
static const char *const TAG = "nfc.tag";
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "ndef_message.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace nfc {
|
||||
namespace esphome::nfc {
|
||||
|
||||
// NFC UIDs are 4, 7, or 10 bytes depending on tag type
|
||||
static constexpr size_t NFC_UID_MAX_LENGTH = 10;
|
||||
@@ -54,5 +53,4 @@ class NfcTag {
|
||||
std::shared_ptr<NdefMessage> ndef_message_;
|
||||
};
|
||||
|
||||
} // namespace nfc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::nfc
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace noblex {
|
||||
namespace esphome::noblex {
|
||||
|
||||
static const char *const TAG = "noblex.climate";
|
||||
|
||||
@@ -299,5 +298,4 @@ bool NoblexClimate::on_receive(remote_base::RemoteReceiveData data) {
|
||||
return true;
|
||||
} // end on_receive()
|
||||
|
||||
} // namespace noblex
|
||||
} // namespace esphome
|
||||
} // namespace esphome::noblex
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
#include "esphome/components/climate_ir/climate_ir.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace noblex {
|
||||
namespace esphome::noblex {
|
||||
|
||||
// Temperature
|
||||
const uint8_t NOBLEX_TEMP_MIN = 16; // Celsius
|
||||
@@ -45,5 +44,4 @@ class NoblexClimate : public climate_ir::ClimateIR {
|
||||
uint8_t remote_state_[8]{};
|
||||
};
|
||||
|
||||
} // namespace noblex
|
||||
} // namespace esphome
|
||||
} // namespace esphome::noblex
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace npi19 {
|
||||
namespace esphome::npi19 {
|
||||
|
||||
static const char *const TAG = "npi19";
|
||||
|
||||
@@ -101,5 +100,4 @@ void NPI19Component::update() {
|
||||
this->status_clear_warning();
|
||||
}
|
||||
|
||||
} // namespace npi19
|
||||
} // namespace esphome
|
||||
} // namespace esphome::npi19
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace npi19 {
|
||||
namespace esphome::npi19 {
|
||||
|
||||
/// This class implements support for the npi19 pressure and temperature i2c sensors.
|
||||
class NPI19Component : public PollingComponent, public i2c::I2CDevice {
|
||||
@@ -25,5 +24,4 @@ class NPI19Component : public PollingComponent, public i2c::I2CDevice {
|
||||
sensor::Sensor *raw_pressure_sensor_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace npi19
|
||||
} // namespace esphome
|
||||
} // namespace esphome::npi19
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "ntc.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ntc {
|
||||
namespace esphome::ntc {
|
||||
|
||||
static const char *const TAG = "ntc";
|
||||
|
||||
@@ -26,5 +25,4 @@ void NTC::process_(float value) {
|
||||
this->publish_state(temp);
|
||||
}
|
||||
|
||||
} // namespace ntc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ntc
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ntc {
|
||||
namespace esphome::ntc {
|
||||
|
||||
class NTC : public Component, public sensor::Sensor {
|
||||
public:
|
||||
@@ -24,5 +23,4 @@ class NTC : public Component, public sensor::Sensor {
|
||||
double c_;
|
||||
};
|
||||
|
||||
} // namespace ntc
|
||||
} // namespace esphome
|
||||
} // namespace esphome::ntc
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "one_wire.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace one_wire {
|
||||
namespace esphome::one_wire {
|
||||
|
||||
static const char *const TAG = "one_wire";
|
||||
|
||||
@@ -51,5 +50,4 @@ bool OneWireDevice::check_address_or_index_() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace one_wire
|
||||
} // namespace esphome
|
||||
} // namespace esphome::one_wire
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace one_wire {
|
||||
namespace esphome::one_wire {
|
||||
|
||||
#define LOG_ONE_WIRE_DEVICE(this) \
|
||||
ESP_LOGCONFIG(TAG, " Address: %s (%s)", this->get_address_name().c_str(), \
|
||||
@@ -43,5 +42,4 @@ class OneWireDevice {
|
||||
bool send_command_(uint8_t cmd);
|
||||
};
|
||||
|
||||
} // namespace one_wire
|
||||
} // namespace esphome
|
||||
} // namespace esphome::one_wire
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "one_wire_bus.h"
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace one_wire {
|
||||
namespace esphome::one_wire {
|
||||
|
||||
static const char *const TAG = "one_wire";
|
||||
|
||||
@@ -93,5 +92,4 @@ void OneWireBus::dump_devices_(const char *tag) {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace one_wire
|
||||
} // namespace esphome
|
||||
} // namespace esphome::one_wire
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include <vector>
|
||||
|
||||
namespace esphome {
|
||||
namespace one_wire {
|
||||
namespace esphome::one_wire {
|
||||
|
||||
class OneWireBus {
|
||||
public:
|
||||
@@ -64,5 +63,4 @@ class OneWireBus {
|
||||
virtual uint64_t search_int() = 0;
|
||||
};
|
||||
|
||||
} // namespace one_wire
|
||||
} // namespace esphome
|
||||
} // namespace esphome::one_wire
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "hub.h"
|
||||
#include "opentherm.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
class BeforeSendTrigger : public Trigger<OpenthermData &> {
|
||||
public:
|
||||
@@ -21,5 +20,4 @@ class BeforeProcessResponseTrigger : public Trigger<OpenthermData &> {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
static const char *const TAG = "opentherm";
|
||||
namespace message_data {
|
||||
@@ -419,5 +418,4 @@ void OpenthermHub::dump_config() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
|
||||
#include "opentherm_macros.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
static const uint8_t REPEATING_MESSAGE_ORDER = 255;
|
||||
static const uint8_t INITIAL_UNORDERED_MESSAGE_ORDER = 254;
|
||||
@@ -175,5 +174,4 @@ class OpenthermHub : public Component {
|
||||
void dump_config() override;
|
||||
};
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
class OpenthermInput {
|
||||
public:
|
||||
@@ -14,5 +13,4 @@ class OpenthermInput {
|
||||
virtual void set_auto_max_value(bool auto_max_value) { this->auto_max_value = auto_max_value; }
|
||||
};
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "opentherm_number.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
static const char *const TAG = "opentherm.number";
|
||||
|
||||
@@ -38,5 +37,4 @@ void OpenthermNumber::dump_config() {
|
||||
this->restore_value_, this->initial_value_, this->state);
|
||||
}
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/components/opentherm/input.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
// Just a simple number, which stores the number
|
||||
class OpenthermNumber : public number::Number, public Component, public OpenthermInput {
|
||||
@@ -27,5 +26,4 @@ class OpenthermNumber : public number::Number, public Component, public Openther
|
||||
void set_restore_value(bool restore_value) { this->restore_value_ = restore_value; }
|
||||
};
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
using std::string;
|
||||
|
||||
@@ -566,5 +565,4 @@ void OpenthermData::s16(int16_t value) {
|
||||
this->valueHB = (value >> 8) & 0xFF;
|
||||
}
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
#include "driver/gptimer.h"
|
||||
#endif
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
template<class T> constexpr T read_bit(T value, uint8_t bit) { return (value >> bit) & 0x01; }
|
||||
|
||||
@@ -403,5 +402,4 @@ class OpenTherm {
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
|
||||
namespace esphome::opentherm {
|
||||
|
||||
// ===== hub.h macros =====
|
||||
|
||||
@@ -158,5 +158,4 @@ namespace opentherm {
|
||||
#define SHOW_INNER(x) #x
|
||||
#define SHOW(x) SHOW_INNER(x)
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "esphome/core/helpers.h" // for clamp() and lerp()
|
||||
#include "opentherm_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
static const char *const TAG = "opentherm.output";
|
||||
|
||||
@@ -14,5 +13,4 @@ void opentherm::OpenthermOutput::write_state(float state) {
|
||||
this->has_state_ = true;
|
||||
ESP_LOGD(TAG, "Output %s set to %.2f", this->id_, this->state);
|
||||
}
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/opentherm/input.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
class OpenthermOutput : public output::FloatOutput, public Component, public OpenthermInput {
|
||||
protected:
|
||||
@@ -29,5 +28,4 @@ class OpenthermOutput : public output::FloatOutput, public Component, public Ope
|
||||
float get_max_value() { return this->max_value_; }
|
||||
};
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "opentherm_switch.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
static const char *const TAG = "opentherm.switch";
|
||||
|
||||
@@ -24,5 +23,4 @@ void OpenthermSwitch::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, " Current state: %d", this->state);
|
||||
}
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/switch/switch.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opentherm {
|
||||
namespace esphome::opentherm {
|
||||
|
||||
class OpenthermSwitch : public switch_::Switch, public Component {
|
||||
protected:
|
||||
@@ -16,5 +15,4 @@ class OpenthermSwitch : public switch_::Switch, public Component {
|
||||
void dump_config() override;
|
||||
};
|
||||
|
||||
} // namespace opentherm
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opentherm
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "opt3001.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opt3001 {
|
||||
namespace esphome::opt3001 {
|
||||
|
||||
static const char *const TAG = "opt3001.sensor";
|
||||
|
||||
@@ -116,5 +115,4 @@ void OPT3001Sensor::update() {
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace opt3001
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opt3001
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/i2c/i2c.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace opt3001 {
|
||||
namespace esphome::opt3001 {
|
||||
|
||||
/// This class implements support for the i2c-based OPT3001 ambient light sensor.
|
||||
class OPT3001Sensor : public sensor::Sensor, public PollingComponent, public i2c::I2CDevice {
|
||||
@@ -22,5 +21,4 @@ class OPT3001Sensor : public sensor::Sensor, public PollingComponent, public i2c
|
||||
bool updating_{false};
|
||||
};
|
||||
|
||||
} // namespace opt3001
|
||||
} // namespace esphome
|
||||
} // namespace esphome::opt3001
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#include "automation.h"
|
||||
#include "esphome/core/log.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace output {
|
||||
namespace esphome::output {
|
||||
|
||||
static const char *const TAG = "output.automation";
|
||||
|
||||
} // namespace output
|
||||
} // namespace esphome
|
||||
} // namespace esphome::output
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
#include "esphome/components/output/binary_output.h"
|
||||
#include "esphome/components/output/float_output.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace output {
|
||||
namespace esphome::output {
|
||||
|
||||
template<typename... Ts> class TurnOffAction : public Action<Ts...> {
|
||||
public:
|
||||
@@ -67,5 +66,4 @@ template<typename... Ts> class SetMaxPowerAction : public Action<Ts...> {
|
||||
};
|
||||
#endif // USE_OUTPUT_FLOAT_POWER_SCALING
|
||||
|
||||
} // namespace output
|
||||
} // namespace esphome
|
||||
} // namespace esphome::output
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user