ESPHome
2024.11.0
esphome
esphome
components
tuya
binary_sensor
tuya_binary_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/tuya/tuya.h
"
5
#include "
esphome/components/binary_sensor/binary_sensor.h
"
6
7
namespace
esphome
{
8
namespace
tuya {
9
10
class
TuyaBinarySensor
:
public
binary_sensor::BinarySensor
,
public
Component
{
11
public
:
12
void
setup
()
override
;
13
void
dump_config
()
override
;
14
void
set_sensor_id
(uint8_t sensor_id) { this->
sensor_id_
= sensor_id; }
15
16
void
set_tuya_parent
(
Tuya
*parent) { this->
parent_
= parent; }
17
18
protected
:
19
Tuya
*
parent_
;
20
uint8_t
sensor_id_
{0};
21
};
22
23
}
// namespace tuya
24
}
// namespace esphome
esphome::Component
Definition:
component.h:68
esphome::tuya::TuyaBinarySensor::parent_
Tuya * parent_
Definition:
tuya_binary_sensor.h:19
binary_sensor.h
esphome::tuya::TuyaBinarySensor::set_sensor_id
void set_sensor_id(uint8_t sensor_id)
Definition:
tuya_binary_sensor.h:14
esphome::tuya::TuyaBinarySensor::setup
void setup() override
Definition:
tuya_binary_sensor.cpp:9
esphome::tuya::Tuya
Definition:
tuya.h:88
esphome::tuya::TuyaBinarySensor::dump_config
void dump_config() override
Definition:
tuya_binary_sensor.cpp:16
esphome::tuya::TuyaBinarySensor
Definition:
tuya_binary_sensor.h:10
tuya.h
esphome::tuya::TuyaBinarySensor::sensor_id_
uint8_t sensor_id_
Definition:
tuya_binary_sensor.h:20
esphome::tuya::TuyaBinarySensor::set_tuya_parent
void set_tuya_parent(Tuya *parent)
Definition:
tuya_binary_sensor.h:16
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
Generated by
1.8.13