rename folder

This commit is contained in:
2023-12-17 20:31:18 +01:00
parent 9ee2ee5864
commit 90b58c7e4d
76 changed files with 0 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
```yaml
# example configuration:
text_sensor:
- platform: empty_text_sensor
name: Empty text sensor
```
@@ -0,0 +1,18 @@
#include "esphome/core/log.h"
#include "empty_text_sensor.h"
namespace esphome {
namespace empty_text_sensor {
static const char *TAG = "empty_text_sensor.text_sensor";
void EmptyTextSensor::setup() {
}
void EmptyTextSensor::dump_config() {
ESP_LOGCONFIG(TAG, "Empty text sensor");
}
} // namespace empty_text_sensor
} // namespace esphome
@@ -0,0 +1,16 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/components/text_sensor/text_sensor.h"
namespace esphome {
namespace empty_text_sensor {
class EmptyTextSensor : public text_sensor::TextSensor, public Component {
public:
void setup() override;
void dump_config() override;
};
} // namespace empty_text_sensor
} // namespace esphome
@@ -0,0 +1,18 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import text_sensor
from esphome.const import CONF_ID
empty_text_sensor_ns = cg.esphome_ns.namespace('empty_text_sensor')
EmptyTextSensor = empty_text_sensor_ns.class_('EmptyTextSensor', text_sensor.TextSensor, cg.Component)
CONFIG_SCHEMA = text_sensor.TEXT_SENSOR_SCHEMA.extend({
cv.GenerateID(): cv.declare_id(EmptyTextSensor)
}).extend(cv.COMPONENT_SCHEMA)
def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
yield text_sensor.register_text_sensor(var, config)
yield cg.register_component(var, config)