I have node-red running as an addon to home-assistant. HA has a wifi power switch that controls the power to a windows pc. I'd like to be able to control the switch from a node-red dashboard.
My current solution is the have a dashboard button that causes the switch to turn on, but there is no way to turn it off because I can't be sure the PB has been shutdown first.
Ideally, I'd like a warning to come up in response to pressing another button to turn it off. I want the warning to ask me to confirm that the PC has been shut down before it goes ahead and turns off the switch.
Can this be done?
Gareth
PS, I do have an alternate solution that checks that the PC is drawing zero amps (or very near) before it turns the switch off, but I'd like to explore a confirmation dialog.