5#ifdef USE_BINARY_SENSOR_FILTER
9#include <initializer_list>
16#define LOG_BINARY_SENSOR(prefix, type, obj) log_binary_sensor(TAG, prefix, LOG_STR_LITERAL(type), obj)
18#define SUB_BINARY_SENSOR(name) \
20 binary_sensor::BinarySensor *name##_binary_sensor_{nullptr}; \
23 void set_##name##_binary_sensor(binary_sensor::BinarySensor *binary_sensor) { \
24 this->name##_binary_sensor_ = binary_sensor; \
53#ifdef USE_BINARY_SENSOR_FILTER
55 void add_filters(std::initializer_list<Filter *> filters);
78#ifdef USE_BINARY_SENSOR_FILTER
struct esphome::EntityBase::EntityFlags flags_
void set_has_state(bool state)
Base class for entities that track a typed state value with change-detection and callbacks.
Base class for all binary_sensor-type classes.
bool trigger_on_initial_state_
void add_filters(std::initializer_list< Filter * > filters)
void publish_state(bool new_state)
Publish a new state to the front-end.
void send_state_internal(bool new_state)
bool state
The current state of this binary sensor. Also used as the backing storage for StatefulEntityBase.
void publish_initial_state(bool new_state)
Publish the initial state, this will not make the callback manager send callbacks and is meant only f...
void set_trigger_on_initial_state(bool value)
const bool & get_state() const override
void add_filter(Filter *filter)
void set_state_value(const bool &value) override
bool set_new_state(const optional< bool > &new_state) override
bool get_trigger_on_initial_state() const override
virtual bool is_status_binary_sensor() const
Return whether this binary sensor has outputted a state.
BinarySensorInitiallyOff()
void log_binary_sensor(const char *tag, const char *prefix, const char *type, BinarySensor *obj)