Describe the solution you'd like
lnxlink already publishes an MQTT LWT (Last Will and Testament) topic (ON / OFF) to indicate client availability. However, this is only used internally as an availability_topic and is not exposed as a standalone entity in Home Assistant.
To use the PC power state in automations, users must:
- Manually create an MQTT sensor/binary_sensor, or
- Rely on
availability of other entities (less clear and harder to reuse)
Proposed Solution
Expose the LWT topic as a binary sensor via MQTT auto-discovery:
{
"name": "PC Power State",
"state_topic": "lnxlink/<hostname>/lwt",
"payload_on": "ON",
"payload_off": "OFF",
"device_class": "running",
"unique_id": "<hostname>_lwt"
}
Simpler automations (no manual config required)
- Clear ON/OFF representation of PC state
- More robust: MQTT LWT ensures it eventually switches to offline even after crashes
- Better UX, especially for new users
- Summary
Expose LWT as a binary sensor to provide a simple and reliable way to track PC power state in Home Assistant.
Additional context
No response
Describe the solution you'd like
lnxlink already publishes an MQTT LWT (Last Will and Testament) topic (
ON/OFF) to indicate client availability. However, this is only used internally as anavailability_topicand is not exposed as a standalone entity in Home Assistant.To use the PC power state in automations, users must:
availabilityof other entities (less clear and harder to reuse)Proposed Solution
Expose the LWT topic as a binary sensor via MQTT auto-discovery:
{ "name": "PC Power State", "state_topic": "lnxlink/<hostname>/lwt", "payload_on": "ON", "payload_off": "OFF", "device_class": "running", "unique_id": "<hostname>_lwt" }Simpler automations (no manual config required)
Expose LWT as a binary sensor to provide a simple and reliable way to track PC power state in Home Assistant.
Additional context
No response