Skip to content

Home Assistant MQTT discovery - #47

Merged
CervezaStallone merged 2 commits into
mainfrom
feat/mqtt-ha-discovery
Nov 3, 2026
Merged

CervezaStallone merged 2 commits into
mainfrom
feat/mqtt-ha-discovery

Conversation

@CervezaStallone

Copy link
Copy Markdown
Owner

Summary

New option in Settings → MQTT: Home Assistant discovery. When enabled, every sensor (slave) shows up in Home Assistant as a device with the sensor's name and manufacturer BRDC, with one entity per quantity (temperature, humidity, dew point, absolute humidity, and wood moisture when it is on).

  • Configs on homeassistant/sensor/<prefix>-<id>/<quantity>/config, retained, QoS 1; only resent when they change (and after a reconnect).
  • unique_id and the device identifier use the sensor id, so renaming a sensor keeps its entities and history in Home Assistant.
  • Availability via the existing <prefix>/status (last will).
  • Removing a sensor, turning wood moisture off or turning discovery off clears the matching configs, so the entities disappear from Home Assistant.
  • Labels and hint in all 5 languages; README and changelog updated.

Test plan

  • python test_app.py: 87/87 pass (new test covers config payload, no resend when unchanged, removal)
  • Live against Mosquitto: discovery configs and state arrive on the broker

Optional in Settings → MQTT. Every sensor becomes a Home Assistant device
with the sensor's name and manufacturer BRDC, with one entity per quantity.
Configs are retained and only resent when they change; removed sensors,
quantities and disabling discovery clear them.
@CervezaStallone CervezaStallone mentioned this pull request Nov 3, 2026
3 tasks done
@CervezaStallone
CervezaStallone merged commit d47a0fa into main Nov 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant