J. Nick Koston 91944988ef [binary_sensor] Remove redundant optional<bool> state_ from StatefulEntityBase
Replace optional<T> state_ in StatefulEntityBase with pure virtual
get_state()/set_state_value_() that subclasses implement. BinarySensor
stores its value in the existing public bool state member and uses
EntityBase::flags_.has_state instead of the optional's discriminant.

Move trigger_on_initial_state_ into EntityBase::flags_ (1 bit from
reserved), eliminating the standalone bool and its padding.

Saves 8 bytes per BinarySensor instance:
- optional<bool> (2B) + padding (2B) = 4B removed
- bool trigger_on_initial_state_ (1B) + padding (3B) = 4B removed
2026-03-22 15:58:31 -10:00
2025-12-21 09:26:03 -05:00
2025-12-08 14:37:45 -05:00
2026-03-12 07:34:53 +13:00
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme Multiple Licenses 632 MiB
Languages
C++ 63.3%
Python 36.3%
C 0.3%