From 157b3ba5f2dfcf48582d9c57f9bfc2c012eb3358 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Tue, 19 Jul 2022 06:11:05 -0400 Subject: [PATCH] Clean up zwave_js device actions logic (#13185) --- .../integration-elements/zwave_js/device-actions.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/panels/config/devices/device-detail/integration-elements/zwave_js/device-actions.ts b/src/panels/config/devices/device-detail/integration-elements/zwave_js/device-actions.ts index 3ff12f5386..2a5de14122 100644 --- a/src/panels/config/devices/device-detail/integration-elements/zwave_js/device-actions.ts +++ b/src/panels/config/devices/device-detail/integration-elements/zwave_js/device-actions.ts @@ -100,19 +100,14 @@ export const getZwaveDeviceActions = async ( action: async () => { if ( isNodeFirmwareUpdateInProgress || - (await fetchZwaveNodeIsFirmwareUpdateInProgress(hass, device.id)) - ) { - showZWaveJUpdateFirmwareNodeDialog(el, { - device, - }); - } else if ( - await showConfirmationDialog(el, { + (await fetchZwaveNodeIsFirmwareUpdateInProgress(hass, device.id)) || + (await showConfirmationDialog(el, { text: hass.localize( "ui.panel.config.zwave_js.update_firmware.warning" ), dismissText: hass.localize("ui.common.no"), confirmText: hass.localize("ui.common.yes"), - }) + })) ) { showZWaveJUpdateFirmwareNodeDialog(el, { device,