ESPHome
2025.9.0-dev
Loading...
Searching...
No Matches
esphome
components
switch
binary_sensor
switch_binary_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
../switch.h
"
4
#include "
esphome/core/component.h
"
5
#include "
esphome/components/binary_sensor/binary_sensor.h
"
6
7
namespace
esphome
{
8
namespace
switch_ {
9
10
class
SwitchBinarySensor
:
public
binary_sensor::BinarySensor
,
public
Component
{
11
public
:
12
void
set_source
(
Switch
*source) {
source_
= source; }
13
void
setup
()
override
;
14
void
dump_config
()
override
;
15
16
protected
:
17
Switch
*
source_
;
18
};
19
20
}
// namespace switch_
21
}
// namespace esphome
binary_sensor.h
esphome::Component
Definition
component.h:71
esphome::binary_sensor::BinarySensor
Base class for all binary_sensor-type classes.
Definition
binary_sensor.h:36
esphome::switch_::SwitchBinarySensor
Definition
switch_binary_sensor.h:10
esphome::switch_::SwitchBinarySensor::setup
void setup() override
Definition
switch_binary_sensor.cpp:9
esphome::switch_::SwitchBinarySensor::source_
Switch * source_
Definition
switch_binary_sensor.h:17
esphome::switch_::SwitchBinarySensor::dump_config
void dump_config() override
Definition
switch_binary_sensor.cpp:14
esphome::switch_::SwitchBinarySensor::set_source
void set_source(Switch *source)
Definition
switch_binary_sensor.h:12
esphome::switch_::Switch
Base class for all switches.
Definition
switch.h:39
component.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
switch.h
Generated by
1.12.0