11namespace binary_sensor {
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; \
51 void add_filters(
const std::vector<Filter *> &filters);
An entity that has a state.
Base class for all binary_sensor-type classes.
void add_filters(const std::vector< Filter * > &filters)
void publish_state(bool new_state)
Publish a new state to the front-end.
void send_state_internal(bool new_state)
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 add_filter(Filter *filter)
virtual bool is_status_binary_sensor() const
Return whether this binary sensor has outputted a state.
bool has_state() const override
void log_binary_sensor(const char *tag, const char *prefix, const char *type, BinarySensor *obj)
Providing packet encoding functions for exchanging data with a remote host.