Clean up zwave_js device actions logic (#13185)

This commit is contained in:
Raman Gupta 2022-07-19 06:11:05 -04:00 committed by GitHub
parent 72443b4f24
commit 157b3ba5f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,