ESPHome
2025.2.2
Main Page
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
d
e
f
i
j
l
m
n
p
q
r
s
t
u
v
+
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
c
d
o
p
s
t
v
w
+
Enumerations
b
c
e
f
i
m
n
p
r
s
t
v
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
+
Functions
_
a
l
m
o
s
t
u
+
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Typedefs
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
esphome
esphome
components
gpio
binary_sensor
gpio_binary_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/core/hal.h
"
5
#include "
esphome/components/binary_sensor/binary_sensor.h
"
6
7
namespace
esphome
{
8
namespace
gpio {
9
10
class
GPIOBinarySensor
:
public
binary_sensor::BinarySensor
,
public
Component
{
11
public
:
12
void
set_pin
(
GPIOPin
*pin) {
pin_
= pin; }
13
// ========== INTERNAL METHODS ==========
14
// (In most use cases you won't need these)
16
void
setup
()
override
;
17
void
dump_config
()
override
;
19
float
get_setup_priority
()
const override
;
21
void
loop
()
override
;
22
23
protected
:
24
GPIOPin
*
pin_
;
25
};
26
27
}
// namespace gpio
28
}
// namespace esphome
hal.h
esphome::Component
Definition:
component.h:68
esphome::gpio::GPIOBinarySensor
Definition:
gpio_binary_sensor.h:10
esphome::gpio::GPIOBinarySensor::get_setup_priority
float get_setup_priority() const override
Hardware priority.
Definition:
gpio_binary_sensor.cpp:21
esphome::gpio::GPIOBinarySensor::set_pin
void set_pin(GPIOPin *pin)
Definition:
gpio_binary_sensor.h:12
esphome::gpio::GPIOBinarySensor::dump_config
void dump_config() override
Definition:
gpio_binary_sensor.cpp:14
binary_sensor.h
esphome::gpio::GPIOBinarySensor::loop
void loop() override
Check sensor.
Definition:
gpio_binary_sensor.cpp:19
esphome::gpio::GPIOBinarySensor::setup
void setup() override
Setup pin.
Definition:
gpio_binary_sensor.cpp:9
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
esphome::binary_sensor::BinarySensor
Base class for all binary_sensor-type classes.
Definition:
binary_sensor.h:37
esphome::gpio::GPIOBinarySensor::pin_
GPIOPin * pin_
Definition:
gpio_binary_sensor.h:24
esphome::GPIOPin
Definition:
gpio.h:50
Generated by
1.8.13