File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
docs/architecture/components Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -199,8 +199,7 @@ This represents the minimum required code to implement a component in ESPHome:
199199
200200 #include "esphome/core/component.h"
201201
202- namespace esphome {
203- namespace example_component {
202+ namespace esphome::example_component {
204203
205204 class ExampleComponent : public Component {
206205 public:
@@ -217,17 +216,15 @@ This represents the minimum required code to implement a component in ESPHome:
217216 int baz_{0};
218217 };
219218
220- } // namespace example_component
221- } // namespace esphome
219+ } // namespace esphome::example_component
222220 ` ` `
223221
224222- **`example_component.cpp:`**
225223 ` ` ` cpp
226224 #include "esphome/core/log.h"
227225 #include "example_component.h"
228226
229- namespace esphome {
230- namespace example_component {
227+ namespace esphome::example_component {
231228
232229 static const char *TAG = "example_component.component";
233230
@@ -248,8 +245,7 @@ This represents the minimum required code to implement a component in ESPHome:
248245 ESP_LOGCONFIG(TAG, " baz = %i", this->baz_);
249246 }
250247
251- } // namespace example_component
252- } // namespace esphome
248+ } // namespace esphome::example_component
253249 ` ` `
254250
255251This represents the minimum required code to implement a component in ESPHome. While most of it is likely reasonably
You can’t perform that action at this time.
0 commit comments