[binary_sensor] Move send_state_internal to header for devirtualization

This commit is contained in:
J. Nick Koston
2026-03-22 16:16:59 -10:00
parent 2833401cc1
commit e28c9d191c
2 changed files with 1 additions and 2 deletions
@@ -32,7 +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) { 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;