6namespace binary_sensor {
8static const char *
const TAG =
"binary_sensor";
23 this->
state = new_state;
26 ESP_LOGD(TAG,
"'%s': New state is %s", this->
get_name().c_str(), ONOFF(new_state));
36 while (last_filter->
next_ !=
nullptr)
37 last_filter = last_filter->
next_;
38 last_filter->
next_ = filter;
42 for (
Filter *filter : filters) {
const StringRef & get_name() const
bool set_state_(const optional< bool > &state)
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.
virtual void input(bool value)
Providing packet encoding functions for exchanging data with a remote host.