Timing and Pausing Appliances with Home Assistant

"I have configured an Ikea switch to turn on and off my microwave, and another Ikea switch to turn on and off my dishwasher in Home Assistant. I would like to set up some automation rules so that:

  • The microwave and dishwasher are turned off after a certain amount of time (e.g. 30 minutes for the microwave and 1 hour for the dishwasher).
  • If the dishwasher is running and I turn on the microwave, the dishwasher is turned off and the timer is paused. Once the microwave is turned off again, the dishwasher is turned back on and the timer is resumed.

I am new to HA, so please treat me as a beginner, still learning even how to find my way around the UI.

Your mixing up in your explanation appliances and smart home devices, so it is hard to say what you want to achieve from automation perspective.

Here’s a pointer at least:

Have you read through the automation documentation? If not, start there.

Its not that easy to explain, but let me try to break it down.

So I have an Ikea on/off switch that controls an Ikea outlet where I plugged in my microwave.
I have another Ikea on/off switch and outlet where I plugged in my dishwasher.

I made it work so that I can turn them on and off, that is no problem. But the problem is when I try to set up a timer to turn a device off.
I tried creating 2 automations for each switch. Turn the device on/ turn the device off. And I put in a timer in the “on” automation where I turn the device on and start a timer, then have the timer turn the device off after a set period of time. This kinda works, but not really. The problem is that if I turn the device on and then use the switch to turn the device off again, then it wont allow me to turn the device back on again until the timer has expired. So not sure how to make it work so that I can turn on and off manually for as much as I want, and if I dont turn off that it turns off once the timer expires.

the second thing I want to do is that if I turn the microwave on, the dishwasher should turn off and pause the timer. when the microwave is turned off again, the dishwasher should turn back on and the timer should continue.

I hope this makes more sense?

for example, this code doesnt turn on the micro at all.

alias: Micro
description: ""
use_blueprint:
  path: Xelloss99/zha-ikea-tradfri-on-off-switch.yaml
  input:
    remote: bf4027021b8055db962298a58c2b33d0
    button_on_short:
      - type: turn_on
        device_id: bbf9ce67c13990e74071de8da16cf845
        entity_id: switch.el_micro_switch
        domain: switch
    timer:
      interval: "00:10:00"
    button_off_short:
      - type: turn_off
        device_id: bbf9ce67c13990e74071de8da16cf845
        entity_id: switch.el_micro_switch
        domain: switch
action:
  - type: turn_off
    device_id: bbf9ce67c13990e74071de8da16cf845
    entity_id: switch.el_micro_switch
    domain: switch

anyone have any suggestions?

Why wouldn’t it? I still don’t understand what the “device” is. Do you turn on/off your appliance or the switch? From where do you turn it on?

You can do that with the services in the documentation I provided above.

The action says turn_off, so I suppose it shouldn’t turn it on :man_shrugging: