ESPHome
2026.6.0-dev
Loading...
Searching...
No Matches
esphome
components
copy
fan
copy_fan.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/fan/fan.h
"
5
6
namespace
esphome::copy
{
7
8
class
CopyFan
:
public
fan::Fan
,
public
Component
{
9
public
:
10
void
set_source
(
fan::Fan
*source) {
source_
= source; }
11
void
setup
()
override
;
12
void
dump_config
()
override
;
13
14
fan::FanTraits
get_traits
()
override
;
15
16
protected
:
17
void
control
(
const
fan::FanCall
&
call
)
override
;
18
void
copy_state_from_source_
();
19
20
fan::Fan
*
source_
;
21
};
22
23
}
// namespace esphome::copy
esphome::Component
Definition
component.h:145
esphome::Component::call
void call()
Definition
component.cpp:221
esphome::copy::CopyFan
Definition
copy_fan.h:8
esphome::copy::CopyFan::control
void control(const fan::FanCall &call) override
Definition
copy_fan.cpp:52
esphome::copy::CopyFan::dump_config
void dump_config() override
Definition
copy_fan.cpp:36
esphome::copy::CopyFan::source_
fan::Fan * source_
Definition
copy_fan.h:20
esphome::copy::CopyFan::get_traits
fan::FanTraits get_traits() override
Definition
copy_fan.cpp:38
esphome::copy::CopyFan::setup
void setup() override
Definition
copy_fan.cpp:8
esphome::copy::CopyFan::set_source
void set_source(fan::Fan *source)
Definition
copy_fan.h:10
esphome::copy::CopyFan::copy_state_from_source_
void copy_state_from_source_()
Definition
copy_fan.cpp:24
esphome::fan::FanCall
Definition
fan.h:37
esphome::fan::Fan
Definition
fan.h:107
esphome::fan::FanTraits
Definition
fan_traits.h:12
component.h
fan.h
esphome::copy
Definition
copy_binary_sensor.cpp:4
Generated by
1.12.0