mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-06 04:48:27 +02:00
Add light.on_state trigger (#2868)
This commit is contained in:
@@ -141,6 +141,13 @@ class LightTurnOffTrigger : public Trigger<> {
|
||||
}
|
||||
};
|
||||
|
||||
class LightStateTrigger : public Trigger<> {
|
||||
public:
|
||||
LightStateTrigger(LightState *a_light) {
|
||||
a_light->add_new_remote_values_callback([this]() { this->trigger(); });
|
||||
}
|
||||
};
|
||||
|
||||
// This is slightly ugly, but we can't log in headers, and can't make this a static method on AddressableSet
|
||||
// due to the template. It's just a temporary warning anyway.
|
||||
void addressableset_warn_about_scale(const char *field);
|
||||
|
||||
Reference in New Issue
Block a user