ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
automation.h
Go to the documentation of this file.
1#pragma once
2
4#ifdef USE_ETHERNET
6
8
9template<typename... Ts> class EthernetConnectedCondition : public Condition<Ts...> {
10 public:
11 bool check(const Ts &...x) override { return global_eth_component->is_connected(); }
12};
13
14template<typename... Ts> class EthernetEnabledCondition : public Condition<Ts...> {
15 public:
16 bool check(const Ts &...x) override { return global_eth_component->is_enabled(); }
17};
18
19template<typename... Ts> class EthernetEnableAction : public Action<Ts...> {
20 public:
21 void play(const Ts &...x) override { global_eth_component->enable(); }
22};
23
24template<typename... Ts> class EthernetDisableAction : public Action<Ts...> {
25 public:
26 void play(const Ts &...x) override { global_eth_component->disable(); }
27};
28
29} // namespace esphome::ethernet
30#endif
Base class for all automation conditions.
Definition automation.h:438
bool check(const Ts &...x) override
Definition automation.h:11
void play(const Ts &...x) override
Definition automation.h:26
void play(const Ts &...x) override
Definition automation.h:21
bool check(const Ts &...x) override
Definition automation.h:16
EthernetComponent * global_eth_component
uint16_t x
Definition tt21100.cpp:5