ESPHome 2025.5.0
Loading...
Searching...
No Matches
gpio_binary_sensor.cpp
Go to the documentation of this file.
2#include "esphome/core/log.h"
3
4namespace esphome {
5namespace gpio {
6
7static const char *const TAG = "gpio.binary_sensor";
8
10 this->pin_->setup();
12}
13
15 LOG_BINARY_SENSOR("", "GPIO Binary Sensor", this);
16 LOG_PIN(" Pin: ", this->pin_);
17}
18
20
22
23} // namespace gpio
24} // namespace esphome
virtual void setup()=0
virtual bool digital_read()=0
void publish_initial_state(bool state)
Publish the initial state, this will not make the callback manager send callbacks and is meant only f...
void publish_state(bool state)
Publish a new state to the front-end.
void loop() override
Check sensor.
float get_setup_priority() const override
Hardware priority.
void setup() override
Setup pin.
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Definition component.cpp:18
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7