ESPHome 2025.7.1
Loading...
Searching...
No Matches
device.h
Go to the documentation of this file.
1#pragma once
2
3namespace esphome {
4
5class Device {
6 public:
7 void set_device_id(uint32_t device_id) { this->device_id_ = device_id; }
8 uint32_t get_device_id() { return this->device_id_; }
9 void set_name(const char *name) { this->name_ = name; }
10 const char *get_name() { return this->name_; }
11 void set_area_id(uint32_t area_id) { this->area_id_ = area_id; }
12 uint32_t get_area_id() { return this->area_id_; }
13
14 protected:
15 uint32_t device_id_{};
16 uint32_t area_id_{};
17 const char *name_ = "";
18};
19
20} // namespace esphome
uint32_t get_device_id()
Definition device.h:8
uint32_t area_id_
Definition device.h:16
uint32_t device_id_
Definition device.h:15
uint32_t get_area_id()
Definition device.h:12
const char * name_
Definition device.h:17
const char * get_name()
Definition device.h:10
void set_device_id(uint32_t device_id)
Definition device.h:7
void set_name(const char *name)
Definition device.h:9
void set_area_id(uint32_t area_id)
Definition device.h:11
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7