[binary_sensor] Inline send_state_internal into header

This commit is contained in:
J. Nick Koston
2026-03-22 16:02:51 -10:00
parent e406fb25cb
commit 047a744ed3
2 changed files with 1 additions and 5 deletions
@@ -32,10 +32,6 @@ void BinarySensor::publish_initial_state(bool new_state) {
this->invalidate_state();
this->publish_state(new_state);
}
void BinarySensor::send_state_internal(bool new_state) {
// set_new_state handles de-duplication, updating this->state via set_state_value_(), and triggering callbacks
this->set_new_state(new_state);
}
bool BinarySensor::set_new_state(const optional<bool> &new_state) {
if (StatefulEntityBase::set_new_state(new_state)) {
@@ -57,7 +57,7 @@ class BinarySensor : public StatefulEntityBase<bool> {
// ========== INTERNAL METHODS ==========
// (In most use cases you won't need these)
void send_state_internal(bool new_state);
void send_state_internal(bool new_state) { this->set_new_state(new_state); }
/// Return whether this binary sensor has outputted a state.
virtual bool is_status_binary_sensor() const;