ESPHome  2024.12.2
automation.h
Go to the documentation of this file.
1 #pragma once
2 #include "safe_mode.h"
3 
5 
6 namespace esphome {
7 namespace safe_mode {
8 
9 class SafeModeTrigger : public Trigger<> {
10  public:
11  explicit SafeModeTrigger(SafeModeComponent *parent) {
12  parent->add_on_safe_mode_callback([this]() { trigger(); });
13  }
14 };
15 
16 } // namespace safe_mode
17 } // namespace esphome
void add_on_safe_mode_callback(std::function< void()> &&callback)
Definition: safe_mode.h:28
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
Definition: automation.h:95
SafeModeTrigger(SafeModeComponent *parent)
Definition: automation.h:11
SafeModeComponent provides a safe way to recover from repeated boot failures.
Definition: safe_mode.h:12
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7