1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-18 19:22:22 +01:00

Formating updates

This commit is contained in:
Daniel Vikström
2024-04-06 00:29:08 +02:00
parent 583e5ea47f
commit 3b5fbc359f
2 changed files with 6 additions and 9 deletions

View File

@@ -2,8 +2,8 @@ from esphome import config_validation as cv
from esphome import codegen as cg
from esphome.const import CONF_ID, CONF_NAME
# DeviceStruct = cg.esphome_ns.struct("Device")
# StringVar = cg.std_ns.struct("string")
# ns = cg.esphome_ns.namespace("device")
# DeviceClass = ns.Class("Device")
StringRef = cg.esphome_ns.struct("StringRef")
MULTI_CONF = True
@@ -12,8 +12,7 @@ CODEOWNERS = ["@dala318"]
CONFIG_SCHEMA = cv.Schema(
{
# cv.Required(CONF_ID): cv.declare_id(DeviceStruct),
# cv.Required(CONF_ID): cv.declare_id(StringVar),
# cv.Required(CONF_ID): cv.declare_id(DeviceClass),
cv.Required(CONF_ID): cv.declare_id(StringRef),
cv.Required(CONF_NAME): cv.string,
}
@@ -21,10 +20,6 @@ CONFIG_SCHEMA = cv.Schema(
async def to_code(config):
# cg.new_variable(
# config[CONF_ID],
# config[CONF_NAME],
# )
cg.new_Pvariable(
config[CONF_ID],
config[CONF_NAME],

View File

@@ -1,6 +1,7 @@
#pragma once
namespace esphome {
namespace device {
class Device {
public:
@@ -11,4 +12,5 @@ class Device {
std::string name_ = "";
};
} // namespace device
} // namespace esphome