mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-05 20:38:27 +02:00
add SUB_SELECT macro (#4897)
This commit is contained in:
@@ -17,6 +17,13 @@ namespace select {
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define SUB_SELECT(name) \
|
||||||
|
protected: \
|
||||||
|
select::Select *name##_select_{nullptr}; \
|
||||||
|
\
|
||||||
|
public: \
|
||||||
|
void set_##name##_select(select::Select *select) { this->name##_select_ = select; }
|
||||||
|
|
||||||
/** Base-class for all selects.
|
/** Base-class for all selects.
|
||||||
*
|
*
|
||||||
* A select can use publish_state to send out a new value.
|
* A select can use publish_state to send out a new value.
|
||||||
|
|||||||
Reference in New Issue
Block a user