ESPHome 2025.12.3
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::template_ {
8
9template<typename... Ts> class TemplateLockPublishAction : public Action<Ts...>, public Parented<TemplateLock> {
10 public:
12
13 void play(const Ts &...x) override { this->parent_->publish_state(this->state_.value(x...)); }
14};
15
16} // namespace esphome::template_
virtual void play(const Ts &...x)=0
Helper class to easily give an object a parent of type T.
Definition helpers.h:932
TEMPLATABLE_VALUE(lock::LockState, state) void play(const Ts &...x) override
Definition automation.h:11
bool state
Definition fan.h:0
LockState
Enum for all states a lock can be in.
Definition lock.h:25
uint16_t x
Definition tt21100.cpp:5