aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Improve documentation and replace publish_on_command with CommandPolicy enumdiogo4642025-12-141-15/+184
| | | | | | | | | | | | | - Enhanced crate-level documentation with comprehensive examples and feature list - Improved README with badges, better structure, and clearer examples - Added README.tpl template and generate-readme.sh script for cargo-readme - Documented run() and connect_and_run() functions with detailed behavior explanations - Replaced publish_on_command boolean with CommandPolicy enum (PublishState/Manual) - Added comprehensive documentation for CommandPolicy explaining both modes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
* added category field to entity discovery payloaddiogo4642025-12-141-0/+4
|
* use 30s mqtt keepalivediogo4642025-12-131-22/+28
|
* publish values on first iteration of rundiogo4642025-12-131-5/+9
| | | | | if the connection fails its possible some value that needed to be published did not get published so this should fix that.
* added device tracker entitydiogo4642025-12-121-13/+115
|
* small visibility fixesv0.1.0diogo4642025-12-091-15/+23
|
* fixed warnings/lintsdiogo4642025-12-091-13/+25
|
* moved embedded-mqtt crate to a modulediogo4642025-12-091-6/+8
|
* added some documentationdiogo4642025-12-091-0/+13
|
* formatting and improved timeout handlingdiogo4642025-12-081-62/+168
|
* code style changediogo4642025-12-071-404/+406
|
* Clear socket timeout after successful connectiondiogo4642025-12-061-0/+2
| | | | | | | | The timeout is now only applied to the connection attempt itself, allowing MQTT communication to proceed without artificial timeouts during normal operation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
* Implement connect_and_run helper functiondiogo4642025-12-061-1/+102
| | | | | | | | | | | | | Added a convenience function to handle connection lifecycle with automatic reconnection. The function supports: - Parsing addresses as IP:port, IP with default port (1883), or hostname with DNS resolution - Filtering DNS results for IPv4 addresses only - Automatic reconnection with 5-second delay on failures - Comprehensive error logging for DNS, TCP, and device run failures - TCP socket timeout of 10 seconds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
* Fix availability handling with MQTT retain flagdiogo4642025-12-061-1/+9
| | | | | | | | | | | | | Added retain flag support to MQTT messages to properly handle device availability in Home Assistant. Both the availability "online" publish and the last will "offline" message now use retain=true, ensuring HA always sees the current device status even when subscribing after the messages were sent. Changes: - Added will_retain field to embedded_mqtt::ConnectParams - Set retain=true for availability publish using publish_with() - Set will_retain=true in connect params for last will message 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
* Complete error handling for availability publishdiogo4642025-12-061-8/+63
| | | | | | | | Added proper error logging and return for availability publish failure, following the same pattern as other MQTT operations in the codebase. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
* Refactor sensor API to support generic sensor types with configurable ↵diogo4642025-12-061-4/+8
| | | | | | | | | | display precision Replaced TemperatureSensor with a generic Sensor type that accepts sensor class, state class, unit, and display precision to support various sensor types. Added suggested_display_precision field to control decimal places in Home Assistant UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
* added publish_on_command option to numberdiogo4642025-12-051-5/+30
|
* reworked loggingdiogo4642025-12-051-25/+37
|
* added publish_on_command option to switchdiogo4642025-12-051-1/+8
|
* changed verbosity of some log messagesdiogo4642025-12-051-5/+5
|
* improved error handling and log messagesdiogo4642025-12-051-85/+167
|
* removed unused commentdiogo4642025-12-051-118/+0
|
* reworked entity storagediogo4642025-12-051-89/+236
|
* reworked entity creationdiogo4642025-12-051-273/+71
|
* added new publish functions to Entitydiogo4642025-12-051-0/+13
|
* added basic binary sensor examplediogo4642025-12-041-12/+98
|
* added switch examplediogo4642025-12-041-1/+95
|
* added number examplediogo4642025-12-041-335/+82
|
* use device id as mqtt client iddiogo4642025-12-041-1/+1
|
* initdiogo4642025-12-041-0/+967