mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 01:36:49 +00:00
Clean up zwave_js device actions logic (#13185)
This commit is contained in:
parent
72443b4f24
commit
157b3ba5f2
@ -100,19 +100,14 @@ export const getZwaveDeviceActions = async (
|
|||||||
action: async () => {
|
action: async () => {
|
||||||
if (
|
if (
|
||||||
isNodeFirmwareUpdateInProgress ||
|
isNodeFirmwareUpdateInProgress ||
|
||||||
(await fetchZwaveNodeIsFirmwareUpdateInProgress(hass, device.id))
|
(await fetchZwaveNodeIsFirmwareUpdateInProgress(hass, device.id)) ||
|
||||||
) {
|
(await showConfirmationDialog(el, {
|
||||||
showZWaveJUpdateFirmwareNodeDialog(el, {
|
|
||||||
device,
|
|
||||||
});
|
|
||||||
} else if (
|
|
||||||
await showConfirmationDialog(el, {
|
|
||||||
text: hass.localize(
|
text: hass.localize(
|
||||||
"ui.panel.config.zwave_js.update_firmware.warning"
|
"ui.panel.config.zwave_js.update_firmware.warning"
|
||||||
),
|
),
|
||||||
dismissText: hass.localize("ui.common.no"),
|
dismissText: hass.localize("ui.common.no"),
|
||||||
confirmText: hass.localize("ui.common.yes"),
|
confirmText: hass.localize("ui.common.yes"),
|
||||||
})
|
}))
|
||||||
) {
|
) {
|
||||||
showZWaveJUpdateFirmwareNodeDialog(el, {
|
showZWaveJUpdateFirmwareNodeDialog(el, {
|
||||||
device,
|
device,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user