mirror of
https://github.com/esphome/esphome.git
synced 2025-09-13 00:32:20 +01:00
Avoid non-const globals and enable clang-tidy check (#1892)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
static const char *TAG = "template.binary_sensor";
|
||||
static const char *const TAG = "template.binary_sensor";
|
||||
|
||||
void TemplateBinarySensor::loop() {
|
||||
if (!this->f_.has_value())
|
||||
|
@@ -6,7 +6,7 @@ namespace template_ {
|
||||
|
||||
using namespace esphome::cover;
|
||||
|
||||
static const char *TAG = "template.cover";
|
||||
static const char *const TAG = "template.cover";
|
||||
|
||||
TemplateCover::TemplateCover()
|
||||
: open_trigger_(new Trigger<>()),
|
||||
|
@@ -4,7 +4,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
static const char *TAG = "template.sensor";
|
||||
static const char *const TAG = "template.sensor";
|
||||
|
||||
void TemplateSensor::update() {
|
||||
if (!this->f_.has_value())
|
||||
|
@@ -4,7 +4,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
static const char *TAG = "template.switch";
|
||||
static const char *const TAG = "template.switch";
|
||||
|
||||
TemplateSwitch::TemplateSwitch() : turn_on_trigger_(new Trigger<>()), turn_off_trigger_(new Trigger<>()) {}
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
namespace esphome {
|
||||
namespace template_ {
|
||||
|
||||
static const char *TAG = "template.text_sensor";
|
||||
static const char *const TAG = "template.text_sensor";
|
||||
|
||||
void TemplateTextSensor::update() {
|
||||
if (!this->f_.has_value())
|
||||
|
Reference in New Issue
Block a user