The Ultimate Smart Home Automation Cookbook

The ‘Announce Dryer is Done Automation’ is a valuable enhancement for any smart home. It utilizes a smart plug with power monitoring to transform a regular clothes dryer into a smart appliance. Smart appliances usually come at double the cost of traditional ones. But with a $25 smart plug, you can gain the advantages of a smart dryer without the hefty price tag. Integrating this with a voice assistant takes your home’s smart home evolution to the next level.

Automation Details

Required Devices

  • Smart Plugs
  • Contact Sensors
  • Voice Assistant

Triggers:

  • Dryer Finishes
  • Dryer Door Opens

Conditions:

  • Don't Announce if Mode is Night
  • Max 2 Notifications per Cycle

Actions:

  • Announce Dryer is Done
  • Increment Dryer Cycle Counter

Important: Smart Plug must have Power Monitoring.

Hobbyist
Hobbyist

Hubitat

Announce Dryer is Done Automation

The Official Documentation for Rule Machine

Option One

Share your devices with Home Assistant using Hubitat Connect.  Then create an automation in Home Assistant using the Alexa Speaks integration outlined under the Home Assistant tab.

  1. Share your smart plug with Home Assistant.Hubitat Maker API for Home Assistant

Option Two

Create and share a virtual switch with Alexa using Alexa Speaks: Shared Devices.  Then create an automation as outlined in Option Three.

Option Three

We’ll use an MQTT Notification device using Alexa Speaks integration.

Setting Up the Automation

  1. Next, go to Apps and click Rule Machine.

    Hubitat App Screen
  2. Select Create New Rule.

    Hubitat Rule Machine Screen
  3. Select Create New Rule.

    Hubitat Rule Machine Name Screen
  4. Select Trigger Event.

    Hubitat Dryer Done Automation Screen
  5. From the Capability drop-down, select Power meter.

    Hubitat Dryer Done Trigger Screen
  6. Set the Trigger event as follows:

    1. Select our smart plug
    2. Set the comparison to Greater Than
    3. Set the Power level to 200
    4. Then click the Done with this Trigger Event button

    Hubitat Dryer Done Trigger Screen
  7. From the Capability drop-down, select Contact.

    Hubitat Dryer Done Trigger Screen
  8. Set the Trigger event as follows:

    1. Select our Dryer Door sensor
    2. Set the Contact reports to open
    3. Then click the Done with this Trigger Event button

    Hubitat Dryer Done Trigger Screen
  9. Next, Click the Done with Trigger Events button.

    Hubitat Dryer Done Trigger Screen
  10. Select Actions to Run.

    Hubitat Dryer Done Automation Screen
  11. Select the Green Plus Sign to Add New Local Variable.

    Hubitat Dryer Done Actions Screen
  12. First, we name the variable dryerCount, then set the type to Number and the value to zero.  Next, we select Create Conditions.

    Hubitat Dryer Done Actions Screen
  13. From the Capability drop-down, select Mode.

    Hubitat Dryer Done Condition Screen
  14. Select Night from the Modes dropdown box.  Next, select NOT this Condition and click the Done with this Condition button.

    Hubitat Dryer Done Condition Screen
  15. We will add another condition from the Capability drop-down, select Variable.

    Hubitat Dryer Done Condition Screen
  16. We will select the variable we created earlier, then set the Comparison to Less Than and the value to 2. Then click the Done with this Condition button.

    The value is how many times Alexa will announce that the dryer is done.  You can adjust it to your liking.

    Hubitat Dryer Done Condition Screen
  17. We will add one final condition from the Capability drop-down, select Contact.

    Hubitat Dryer Done Condition Screen
  18. Set the Condition as follows:

    1. Select our Dryer Door sensor
    2. Set the Contact is to open
    3. Then click the Done with this Condition button.

    Hubitat Dryer Done Condition Screen
  19. Then, Click the Done with Conditions button.

    Hubitat Dryer Done Condition Screen
  20. Select the Green Plus Sign to Add New Action.

    Hubitat Dryer Done Actions Screen
  21. Configure the New Action as follows:

    1. From the first dropdown, select Conditional Actions
    2. Then, select the If Expression THEN from the list in the following dropdown.
    3. Select the contact condition we created earlier
    4. Then, click the Done with IF Expression THEN button.

    Hubitat Dryer Done New Actions Screen
  22. Select the Green Plus Sign to Add New Action.

    Hubitat Dryer Done Actions Screen
  23. Configure the New Action as follows:

    1. From the first dropdown, select Set Variable, Mode or File, Run Custom Action
    2. From the following dropdown select Set Variable
    3. Then select the local variable we created earlier
    4. Set the Select operation to Number
    5. Set the Number to set dryerCount to zero
    6. Then, click the Done with action button.

    Hubitat Dryer Done New Actions Screen
  24. Click the ELSE button and then select the Green Plus Sign to Add New Action.

    Hubitat Dryer Done Actions Screen
  25. Configure the New Action as follows:

    1. From the first dropdown, select Delay, Wait, Exit, or Comment
    2. From the following dropdown, select Wait for Events
    3. Then select Power meter and select our smart plug
    4. Set the Comparison to less than
    5. Set the Power level to 20
    6. Then, click the Done with this Wait Event button.

    Hubitat Dryer Done New Actions Screen
  26. Next, click the Done with Wait Events button.

    Hubitat Dryer Done New Actions Screen
  27. Select the Green Plus Sign to Add New Action.

    Hubitat Dryer Done Actions Screen
  28. Configure the New Action as follows:

    1. From the first dropdown, select Conditional Actions
    2. Then, select the If Expression THEN from the list in the following dropdown.
    3. Select the mode condition we created earlier
    4. Then, select AND from the dropdown list

    Hubitat Dryer Done New Actions Screen
  29. Next, Select the variable condition we created earlier, then click the Done with IF Expression THEN button.

    Hubitat Dryer Done New Actions Screen
  30. Select the Green Plus Sign to Add New Action.

    Hubitat Dryer Done Actions Screen
  31. On the Create New Action screen we have a decision to make.

    Option two:

    Configure the New Action as follows:

    1. From the first dropdown, select Control Switches, Push Buttons
    2. Then, select the Turn switches on/off from the list in the following dropdown.
    3. Select the virtual switch we create earlier.
    4. Make sure it’s set to on.
    5. Then, click the Done with action button.

     

    Hubitat Dryer Done New Actions Screen

    Option Three:

    Configure the New Action as follows:

    1. Select Send Message: Notify, Speak, Log, HTTP Request from the list for the first dropdown.
    2. Then Select Send/Speak a message.
    3. Type your message.
    4. Select your MQTT Notification device.
    5. Then, click the Done with action button.

    Hubitat Dryer is Done Notification
  32. Select the Green Plus Sign to Add New Action.

    Hubitat Dryer Done Actions Screen
  33. Configure the New Action as follows:

    1. From the first dropdown, select Set Variable, Mode or File, Run Custom Action
    2. From the following dropdown, select Set Variable
    3. Then select variable we created earlier
    4. Set the Select operation to add number
    5. Set the Number to add to 1
    6. Then, click the Done with action button.

    Hubitat Dryer Done New Actions Screen
  34. Click the END-IF button twice to close out both of our conditional actions, then click the Done with Actions button.

    Hubitat Dryer Done Actions Screen
  35. Click the Done button to complete the automation.

    Success: That’s It! Now move on to the Amazon Alexa Tab if you are using Option Two

    Hubitat Dryer Done Automation Screen

Home Assistant

Announce Dryer is Done Automation

The Official Documentation for Automation editor

Option One

Important: This automation requires Alexa Speaks Integration.

Setting Up the Automation

  1. First, we need to go to Settings and Devices & Services.

    Home Assistant Settings Screen
  2. At the top of the screen, click Helpers, then the blue Create Helper button at the bottom.

    Home Assistant Create Helper
  3. Select Number from from the helper type list.

    Home Assistant Create Helper Screen
  4. Create the Number with the following properties:

    1. Give the helper a name dryerCount.
    2. If you want to give the helper an icon, select it from the list.
    3. Set the Minimum value to 0.
    4. Set the Maximum value to 2
    5. Make sure the step size is set to 1.
    6. Click Create.

    Home Assistant Create Number Screen
  5. Next, we need to go to Settings and Automations & Scenes.

    Home Assistant Settings Screen
  6. Click the blue Create Automation button.

    Home Assistant Automations Screen
  7. Choose Create new automation.

    Home Assistant Create Automation Screen
  8. Click Add Trigger.

    Home Assistant New Automation Screen
  9. From the trigger type list, select Device.

    Home Assistant Trigger Types Menu
  10. Set the trigger device as follows:

    1. Select our dryer switch for the device.
    2. Select Dryer Switch Power power changes for the trigger.
    3. Set the Above value to 200.
    4. Then, click the Add Trigger button and select Device again from the list.

    Home Assistant Add Trigger Device
  11. Select our dryer door contact sensor for the device and set the trigger to Dryer Door Contact opened.  Then click the vertical ellipses and select Edit ID.

    Home Assistant Add Trigger Device
  12. Set the ID for this trigger as Dryer_Door, and click the Add Condition button.

    Home Assistant Add Trigger Device ID
  13. Select NOT from the Condition list, then click the Add Condition button and select State.

    Home Assistant Add Condition
  14. Select our Hub Mode for the Entity and set the state to Night.  Then, click the Add Action button.

    Home Assistant Add Condition Not
  15. From the list of actions, select If-then.

    Home Assistant Add Action If-then
  16. Click the Add Condition button and choose Trigger ID.

    Home Assistant Add Action If-then Add Condition
  17. Select the Trigger ID we created earlier. Then click the Add Action button and select Call Service from the list.

    Home Assistant Add Condition Trigger ID
  18. Setup the call service as follows:

    1. Choose Counter: Reset for the service.
    2. Click the Choose entity button.
    3. Select our DyerCount helper we created earlier.
    4. Then click Add else, next select Wait for Trigger Event from the list, then the Add Trigger button and select Device.

    Home Assistant Add Action Call Service
  19. Set the device trigger event as:

    1. Select our Dryer Switch as the device.
    2. Set the trigger to Dryer Switch Power power changes.
    3. Set the Below value to 20.
    4. Then click the Add Action button and select Call Service from the action list.

    Home Assistant Add Trigger Event
  20. Select the echo notification device we wish to use for this automation as the service.  Set the message to “Dryer is done.”  Then, under data type type: tts then, click the Add Action Button and select the call service from the action list.

    Home Assistant Add Action Notification
  21. In the Service box, select Counter: Increment.  Then click the Choose entity button and choose our DryerCount helper.  Finally, click the blue Save button.

    Home Assistant Add Action Increment Counter
  22. Success: That’s It! Name the automation and click save.

    Home Assistant Announce Dryer is Done Automation Finished

Amazon Alexa

Announce Dryer is Done Automation

The Official Documentation for Alexa Routines

Option Two

Share a virtual switch with Alexa and use that as a trigger in the app.

Setting Up the Automation

  1. First, Click the More button at the bottom right of the screen.

    Alexa Home Screen
  2. Click the Routines button.

    Alexa More Menu
  3. Click the plus sign to add a new routine.

    Alexa Routines Screen
  4. Click the plus sign by Enter routine name.

    Alexa New Routine Screen
  5. Enter a Name for the Routine, then click Next.

    Alexa Dryer Done Routine Name
  6. Click the plus sign by When this happens.

    Alexa Dryer Done Trigger
  7. On the When This Happens screen, click Smart Home.

    Alexa Welcome Home Trigger Smart Home
  8. Select the virtual sensor/switch we shared with Alexa.

    Alexa Dryer Done Trigger Virtual Device
  9. When Contact Sensor is… select open and click Next.

    Alexa Dryer Done Trigger Virtual Device Open
  10. Click the plus sign by Add action.

    Alexa Dryer Done Actions
  11. On the Add New screen, select Alexa Says.

    Alexa Welcome Home Actions Add New
  12. Select Customized.

    Alexa Welcome Home Actions Alexa Says Customized
  13. Type your message and click Next.

    Alexa Dryer Done Actions Alexa Says Message
  14. Confirm the message by clicking Next.

    Alexa Dryer Done Actions Alexa Says Message confirm
  15. Click Choose Device.

    Alexa Dryer Done Actions Alexa Says Device
  16. If you want to add another Alexa device you will have to add another action. Hopefully Amazon will allow you to choose a speaker group in the future.

    Click Save to complete the Routine.

    Success: That’s It! Your Dumb Appliance is now Smart

    Alexa Dryer Done Complete Automation