ESPHome
2026.3.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::switch_
{
8
9
class
SwitchBinarySensor
:
public
binary_sensor::BinarySensor
,
public
Component
{
10
public
:
11
void
set_source
(
Switch
*source) {
source_
= source; }
12
void
setup
()
override
;
13
void
dump_config
()
override
;
14
15
protected
:
16
Switch
*
source_
;
17
};
18
19
}
// namespace esphome::switch_
binary_sensor.h
esphome::Component
Definition
component.h:87
esphome::binary_sensor::BinarySensor
Base class for all binary_sensor-type classes.
Definition
binary_sensor.h:33
esphome::switch_::SwitchBinarySensor
Definition
switch_binary_sensor.h:9
esphome::switch_::SwitchBinarySensor::setup
void setup() override
Definition
switch_binary_sensor.cpp:8
esphome::switch_::SwitchBinarySensor::source_
Switch * source_
Definition
switch_binary_sensor.h:16
esphome::switch_::SwitchBinarySensor::dump_config
void dump_config() override
Definition
switch_binary_sensor.cpp:13
esphome::switch_::SwitchBinarySensor::set_source
void set_source(Switch *source)
Definition
switch_binary_sensor.h:11
esphome::switch_::Switch
Base class for all switches.
Definition
switch.h:38
component.h
esphome::switch_
Definition
automation.cpp:4
switch.h
Generated by
1.12.0