15 LOG_ENTITY_DEVICE_CLASS(tag, prefix, *obj);
19#ifdef USE_BINARY_SENSOR_FILTER
23#ifdef USE_BINARY_SENSOR_FILTER
36#if defined(USE_BINARY_SENSOR) && defined(USE_CONTROLLER_REGISTRY)
37 ControllerRegistry::notify_binary_sensor_update(
this);
39 ESP_LOGV(TAG,
"'%s' >> %s", LOG_STR_ARG(this->
get_log_name()), ONOFFMAYBE(new_state));
45#ifdef USE_BINARY_SENSOR_FILTER
52 while (last_filter->
next_ !=
nullptr)
53 last_filter = last_filter->
next_;
54 last_filter->
next_ = filter;
58 for (
Filter *filter : filters) {
const LogString * get_log_name() const
Get the name for a "%s" log argument (LOG_STR_ARG).
virtual bool set_new_state(const optional< T > &new_state)
Apply a new state, de-duplicating and firing callbacks as needed.
Base class for all binary_sensor-type classes.
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)
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)
bool set_new_state(const optional< bool > &new_state) override
virtual bool is_status_binary_sensor() const
Return whether this binary sensor has outputted a state.
virtual void input(bool value)
void log_binary_sensor(const char *tag, const char *prefix, const char *type, BinarySensor *obj)
ESPHOME_LOG_TAG(TAG, "binary_sensor.automation")
bool log_entity_header(const char *tag, const char *prefix, const char *type, const EntityBase *obj)
Log "<prefix><type> '<name>'" for a dump_config header; returns false when obj is null.