1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-14 13:55:45 +00:00

[event] Store event types in flash memory

This commit is contained in:
J. Nick Koston
2025-11-07 11:39:17 -06:00
parent f4fea1a00f
commit 51a238f3d2

View File

@@ -36,11 +36,6 @@ class Event : public EntityBase, public EntityBase_DeviceClass {
this->types_ = event_types;
this->last_event_type_ = nullptr; // Reset when types change
}
/// Set the event types supported by this event (from C array).
template<size_t N> void set_event_types(const char *const (&event_types)[N]) {
this->types_.assign(event_types, event_types + N);
this->last_event_type_ = nullptr; // Reset when types change
}
// Deleted overloads to catch incorrect std::string usage at compile time with clear error messages
void set_event_types(std::initializer_list<std::string> event_types) = delete;