diff --git a/src/publisher.ts b/src/publisher.ts index c8e5d3d..da70ce3 100644 --- a/src/publisher.ts +++ b/src/publisher.ts @@ -40,7 +40,7 @@ export async function runPublishLoop( for (const bootEntry of bootEntries) { await mqttClient.publishAsync( - `homeassistant/button/${config.device.key}/button-trigger-reboot/config`, + `homeassistant/button/${config.device.key}/button-trigger-reboot-${bootEntry.number}/config`, JSON.stringify({ device, command_topic: `${state_topic}/trigger-reboot`, @@ -48,7 +48,7 @@ export async function runPublishLoop( name: `Reboot into ${bootEntry.label} - ${bootEntry.number}`, object_id: `efibootmgr_${config.device.key}_${entityIds.actions.triggerReboot}_${bootEntry.number}`, payload_press: bootEntry.number, - unique_id: `${config.device.key}_efibootmgr_${entityIds.actions.triggerReboot}`, + unique_id: `${config.device.key}_efibootmgr_${entityIds.actions.triggerReboot}_${bootEntry.number}`, }), ); }