<feed xmlns='http://www.w3.org/2005/Atom'>
<title>embassy-ha/src/lib.rs, branch embassy-git</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/'/>
<entry>
<title>fixed doctest</title>
<updated>2026-01-20T15:03:02+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T15:03:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=d5fa72f84b3469844b636c5dd0cb0105e8d93bf8'/>
<id>d5fa72f84b3469844b636c5dd0cb0105e8d93bf8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>derive default instead of manual impl for DeviceBuffersOwned</title>
<updated>2026-01-20T15:00:25+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-20T14:59:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=fde795c093c0392988cae4690b8ef85483d30162'/>
<id>fde795c093c0392988cae4690b8ef85483d30162</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: prefix discovery unique_id with device id</title>
<updated>2026-01-19T20:10:36+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-19T20:10:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=aa47d88882d9bd6c7753315c8fe1b9b2e9b21fa7'/>
<id>aa47d88882d9bd6c7753315c8fe1b9b2e9b21fa7</id>
<content type='text'>
right now we use the entity id as the unique_id in the entity discovery
payload but we should have been prefixing it with the device_id like
with did for the topics to avoid generating collisions.

for example if we have devices 'relay_0' and 'relay_1' and they both
have a button entity with id 'trigger' then the topics will be
correctly generated using the id 'relay_0_trigger' and
'relay_1_trigger' but the unique id field in the discovery payload
is being set as 'trigger' for both entities which causes this type
of error to show up on the home assistant logs:

 2026-01-19 19:52:07.539 ERROR (MainThread) [homeassistant.components.button] Platform mqtt does not generate unique IDs. ID open already exists - ignoring button.porta_frente_abri │
│ 2026-01-19 19:52:07.611 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID wifi-rssi already exists - ignoring sensor.porta_frente │
│ 2026-01-19 19:56:08.013 ERROR (MainThread) [homeassistant.components.button] Platform mqtt does not generate unique IDs. ID open already exists - ignoring button.porta_frente_abri │
│ 2026-01-19 19:56:08.067 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID wifi-rssi already exists - ignoring sensor.porta_frente |
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
right now we use the entity id as the unique_id in the entity discovery
payload but we should have been prefixing it with the device_id like
with did for the topics to avoid generating collisions.

for example if we have devices 'relay_0' and 'relay_1' and they both
have a button entity with id 'trigger' then the topics will be
correctly generated using the id 'relay_0_trigger' and
'relay_1_trigger' but the unique id field in the discovery payload
is being set as 'trigger' for both entities which causes this type
of error to show up on the home assistant logs:

 2026-01-19 19:52:07.539 ERROR (MainThread) [homeassistant.components.button] Platform mqtt does not generate unique IDs. ID open already exists - ignoring button.porta_frente_abri │
│ 2026-01-19 19:52:07.611 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID wifi-rssi already exists - ignoring sensor.porta_frente │
│ 2026-01-19 19:56:08.013 ERROR (MainThread) [homeassistant.components.button] Platform mqtt does not generate unique IDs. ID open already exists - ignoring button.porta_frente_abri │
│ 2026-01-19 19:56:08.067 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID wifi-rssi already exists - ignoring sensor.porta_frente |
</pre>
</div>
</content>
</entry>
<entry>
<title>add mqtt helper functions and refactor buffer management</title>
<updated>2026-01-09T11:30:08+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2026-01-09T11:28:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=27779ecf0d7c00ae0acb650c0d75d28edcc3aa89'/>
<id>27779ecf0d7c00ae0acb650c0d75d28edcc3aa89</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed clippy warnings</title>
<updated>2025-12-16T14:02:20+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-12-16T14:02:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=28c4116565bfe71ef7328f4a34458501ef3dc5b0'/>
<id>28c4116565bfe71ef7328f4a34458501ef3dc5b0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve documentation and replace publish_on_command with CommandPolicy enum</title>
<updated>2025-12-14T14:49:02+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-12-14T14:49:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=993d2a9fd34ce08760933a013e638108827f6f70'/>
<id>993d2a9fd34ce08760933a013e638108827f6f70</id>
<content type='text'>
- 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 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>added category field to entity discovery payload</title>
<updated>2025-12-14T14:17:56+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-12-14T14:17:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=ab4a7c83e00314a2f5d2f455987ba530fd08bdd7'/>
<id>ab4a7c83e00314a2f5d2f455987ba530fd08bdd7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>use 30s mqtt keepalive</title>
<updated>2025-12-13T20:32:31+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-12-13T20:32:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=871b67e886ed9853e3fa392ff33a05c7da09fe9b'/>
<id>871b67e886ed9853e3fa392ff33a05c7da09fe9b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>publish values on first iteration of run</title>
<updated>2025-12-13T20:09:33+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-12-13T20:09:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=b456db36b7d973154f0a10bc1adca235de2c5c12'/>
<id>b456db36b7d973154f0a10bc1adca235de2c5c12</id>
<content type='text'>
if the connection fails its possible some value that needed to be
    published did not get published so this should fix that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
if the connection fails its possible some value that needed to be
    published did not get published so this should fix that.
</pre>
</div>
</content>
</entry>
<entry>
<title>added device tracker entity</title>
<updated>2025-12-12T12:05:58+00:00</updated>
<author>
<name>diogo464</name>
<email>diogo464@d464.sh</email>
</author>
<published>2025-12-12T12:05:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.d464.sh/rust/embassy-ha/commit/?id=e041614b0607a0950be1446f595d85c93b501418'/>
<id>e041614b0607a0950be1446f595d85c93b501418</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
