44 Commits

Author SHA1 Message Date
962300712f use configTopic as a temporary object 2025-10-11 16:00:31 +02:00
adf1629aad add support for specifying entity_id on HA side, instead of being
autogenerated based on the name
2025-10-09 11:24:12 +02:00
9093996ec9 use standard fixed length types 2025-10-08 17:14:06 +02:00
2b23bbf178 fix tests 2025-10-08 11:36:43 +02:00
9511f08d2b don't create Builders on heap, use temporary objects instead 2025-10-08 11:36:40 +02:00
c98df614c4 optimize performance by using function template - it avoids type erasure and heap allocation 2025-10-05 12:11:24 +02:00
07eeac8beb add support for using lambdas with captures as factory_builder functions 2025-10-05 11:35:55 +02:00
01c7eb8479 re-organize state and command topics by removing component type from path 2025-10-03 10:28:44 +02:00
d69a0a59cb add binary sensor which requires the introduction of GenericSensor class 2025-10-02 08:08:12 +02:00
6924775e02 implement toJson for Component and Command to be used in webserver
responses
2025-09-08 12:22:38 +02:00
c82cb3670c add map for command->id to offer support for web server 2025-09-06 17:14:15 +02:00
df53af65fa use long term statistics as default for battery sensors 2025-06-07 09:14:32 +02:00
57160661ec use type safe SensorStateClass-es 2025-06-06 14:58:18 +02:00
391fa927ba add support for SensorStateClass (used for long term statistics) and use it as default for Temperature and Humidity sensors 2025-06-05 19:34:06 +02:00
5d9b0862bf valueTemplate is specific to all state components 2025-03-26 13:38:16 +01:00
94ff72aefc add support of unitMeasure for Numbers 2025-03-26 13:37:38 +01:00
4037ede011 add support for icon 2025-03-26 10:20:31 +01:00
4b600a4686 fix possible bug: restore from state needs a state topic 2025-02-10 09:22:30 +01:00
935041204e add text component 2025-02-06 13:22:46 +01:00
70535f3467 add light component 2025-02-03 19:11:55 +01:00
ab11cdacd8 use inline for static members - avoid declaring them outside of class 2025-01-10 13:33:58 +01:00
5c3e0c2236 rename utils.h to list.h 2024-10-29 10:06:27 +01:00
803d969de6 fixes:
- use HA's default values for min, max & step
- initialize topic arrays with nullptr
- re-order code
2024-10-28 21:10:53 +01:00
9930171d58 simplify: move building of configTopic and uniqueId inside component 2024-10-28 12:37:15 +01:00
0eec971560 add support for jsonAttributesTemplate and remove overrideConfig 2024-10-28 12:13:42 +01:00
92b5837538 change parameters' order in Component constructor - id is mandatory 2024-10-28 12:05:34 +01:00
1787f20ddb refactoring: combine composition and inheritance for building the configuration 2024-10-28 11:58:41 +01:00
2a5fb84d83 bug fix
- StatefulCommand was wrongly initialized with number type, instead of the incoming parameter
2024-10-28 11:58:41 +01:00
47a5bfc81c make min, max & step optional 2024-10-28 11:58:41 +01:00
3a374bf685 no need to use friend in DeviceConfig 2024-10-28 11:58:41 +01:00
7755950a27 give maps more meaningful names and introduce StatefulCommand 2024-10-28 11:58:41 +01:00
fe8b33df72 optimize ArduinoJson serialization: avoid copies of strings 2024-10-18 22:14:45 +02:00
baa3d2d0b8 - avoid possible buffer overflows by using snprintf
- uniqueId is a field now - optimizes string copy
- store long strings in FLASH memory
2024-10-18 22:14:37 +02:00
138c7b5cd8 read heap stats once and put them in both sensors and json attributes 2024-10-18 08:45:24 +02:00
0227340a1f fix possible hash related bug with storing char instead of string into map 2024-10-15 17:20:19 +02:00
eb98e0562b protect members that are not to be used outside 2024-10-10 21:04:32 +02:00
f1901a1b53 add support for precondfigured components - heap stats 2024-10-08 20:56:27 +02:00
7327533b24 detect a multi value sensor based on common id 2024-10-07 22:06:26 +02:00
dbedf0d2f1 fix typo 2024-10-07 22:01:25 +02:00
2bdbba1113 sensor: specifying a precision implies the sensor is number, but it
needs to be generic (e.g. text)
set a default precision only if there is a unit_of_measurement
2024-10-07 21:42:09 +02:00
69c4222553 secondary components: always put the device name in MQTT configuration, even it is just
referenced - new requirement from HA
2024-10-07 15:16:47 +02:00
1dea02cd0d add support for configuring components with any json property 2024-06-30 20:35:02 +02:00
6c78efa3c2 add support for precision in sensors 2024-06-30 13:42:47 +02:00
728043a606 first version of the library 2024-05-30 08:18:59 +02:00