ESPHome 2025.5.0
Loading...
Searching...
No Matches
automation.h
Go to the documentation of this file.
1#pragma once
2
3#include "template_lock.h"
4
6
7namespace esphome {
8namespace template_ {
9
10template<typename... Ts> class TemplateLockPublishAction : public Action<Ts...>, public Parented<TemplateLock> {
11 public:
13
14 void play(Ts... x) override { this->parent_->publish_state(this->state_.value(x...)); }
15};
16
17} // namespace template_
18} // namespace esphome
virtual void play(Ts... x)=0
Helper class to easily give an object a parent of type T.
Definition helpers.h:538
TEMPLATABLE_VALUE(lock::LockState, state) void play(Ts... x) override
Definition automation.h:12
bool state
Definition fan.h:0
LockState
Enum for all states a lock can be in.
Definition lock.h:26
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
uint16_t x
Definition tt21100.cpp:5