aboutsummaryrefslogtreecommitdiff
path: root/src/constants.rs
Commit message (Collapse)AuthorAgeFilesLines
* add mqtt helper functions and refactor buffer managementdiogo4642026-01-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Created helper functions to eliminate code duplication in MQTT operations: - device_mqtt_subscribe: handles subscription with timeout and error logging - device_mqtt_publish: handles publishing with optional retain flag - mqtt_receive_data: handles data receiving with buffer validation and timeout - publish_entity_discoveries: publishes all entity discoveries - generate_entity_discovery: generates entity discovery payloads Refactored buffer management by introducing DeviceBuffersOwned and DeviceBuffers structures to group related buffers together, making them easier to pass to helper functions. Added MQTT_TIMEOUT constant at module level for consistent timeout handling. Fixed bug where only the last entity's discovery was republished when Home Assistant came back online. Now correctly republishes all entities by subscribing to homeassistant/status and using publish_entity_discoveries when the "online" status is received. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* added device tracker entitydiogo4642025-12-121-0/+1
|
* added dBm unit for signal strengthdiogo4642025-12-091-0/+3
| | | | | | 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* added state class constants/enumdiogo4642025-12-061-0/+4
|
* reworked entity storagediogo4642025-12-051-0/+2
|
* reworked entity creationdiogo4642025-12-051-0/+147
|
* added monetary constantsdiogo4642025-12-051-0/+17
|
* added basic binary sensor examplediogo4642025-12-041-0/+3
|
* added switch examplediogo4642025-12-041-0/+3
|
* added number examplediogo4642025-12-041-0/+27
|
* fixed temperature unitsdiogo4642025-12-041-0/+4
|
* initdiogo4642025-12-041-0/+97