Zooz Plug with Energy Monitoring for Automations

I had a Smart Things multi-purpose sensors on the washing machine detecting vibration to send notifications that the washing machine was finished, but I got a lot of false positives. So Instead I now have the zooz plug with monitoring. I can see it getting the power data fine so I know its working. I can’t figure out how to get the Notification automation working.

I saw some other posts using the Numeric State trigger for below a certain wattage for 5 minutes. I have checked the Attributes under Developer Tools for the washing machine power meter, and I do see the “unit_of_measurement: W”. I have tried 3 different automation setups with the Attribute in Numeric State set to “W”, Set to “unit_of_measurement: W” and set to “unit of measurement” with Below 3 and For 5 minutes, but none of these will trigger.

Any help would be appreciated. Below is the one I thought would work, but I have also tried with “attribute: Unit_of_Measurement: W” and no luck.

alias: New Power - Washing Finished
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.washing_machine_switch_power_meter
    for:
      hours: 0
      minutes: 5
      seconds: 0
    attribute: W
    below: 3
condition: []
action:
  - service: notify.alexa_media_living_room_echo
    data:
      message: The Washing Machine Has finished.
      target: notify.alexa_media_living_room_echo
      data:
        type: tts
mode: single

I used a threshold helper to indicate the washer is running.

I’ve set my automation up to only push a notification if the motion sensor in the laundry room is not active. Don’t want a notification if someone is already in there.

alias: Laundry Automation - Washing Machine
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.washing_machine
    from: "on"
    to: "off"
condition: []
action:
  - if:
      - type: is_no_motion
        condition: device
        device_id: 69d34b5ca76d727dc546dabe01f00705
        entity_id: binary_sensor.laundry_room_motion_sensor_occupancy
        domain: binary_sensor
    then:
      - service: notify.all_mobile_apps
        data:
          message: The washing machine is done.
      - if:
          - condition: device
            type: is_off
            device_id: d466234f890331cef579a538462efe71
            entity_id: remote.sony_xbr_75x900h
            domain: remote
        then:
          - service: light.turn_on
            data:
              color_name: blue
            target:
              entity_id: light.bar_overhead_light2
        else:
          - wait_for_trigger:
              - platform: device
                device_id: d466234f890331cef579a538462efe71
                domain: media_player
                entity_id: media_player.sony_xbr_75x900h
                type: turned_off
          - service: light.turn_on
            data:
              color_name: blue
            target:
              entity_id: light.bar_overhead_light2
      - wait_for_trigger:
          - type: motion
            platform: device
            device_id: 69d34b5ca76d727dc546dabe01f00705
            entity_id: binary_sensor.laundry_room_motion_sensor_occupancy
            domain: binary_sensor
      - service: light.turn_on
        data:
          kelvin: 3000
        target:
          entity_id: light.bar_overhead_light2
      - if:
          - condition: state
            entity_id: light.bar_overhead_light1
            state: "off"
        then:
          - service: light.turn_off
            data: {}
            target:
              entity_id: light.bar_overhead_light2
mode: single

Which Zooz plug do you have and which Z-Wave integration are you using?

With the ZEN15 and Z-Wave JS UI, the power consumption has its own entity.

I have the " Zooz Z-Wave Plus Power Switch ZEN15". I am getting data from the Power Meter and the Energy Consumption just fine. The power meter is definitely the entity I want, just not sure why its not triggering the automation. It was added via smart things.

The issue with the Motion and vibration sensor is it starts and stops, and I know I could prb tweak the time for no motion\vibration but the power meter sounded more solid.

Any one else have any ideas here? Just feels like an issue with the attribute but I can’t figure it out.

I think you are confused about what attributes are. Not all entities have attributes, and what you’re doing (probably?) doesn’t require them. If you go to Developer Tools → States and search for your entity, you can see what the state is and also what attributes it has (if any) and what the attributes’ values are.

My guess is that the entity sensor.washing_machine_switch_power_meter reports a state that is a value in Watts. That should be all you need. If you never knew that attributes existed, you’d probably have a working automation already.

When you look at your entity in developer tools, does the state report the number that you want to act upon? If so, just delete the attribute: W line from your automation and it will probably work.

Rick,

Thanks for the comment, I will try one without the Attribute and see if it works. The Numeric State trigger would still be correct?

Here are the Attributes I see in the Dev tools:

state_class: measurement
unit_of_measurement: W
device_class: power
icon: mdi:power-plug
friendly_name: Washing Machine Switch Power Meter

Yes numeric_state is still the trigger you want. You’d only want the attribute: line if you are monitoring a specific attribute for a change. Since none of those attributes you’ve listed are numbers, you can’t use numeric state for them anyways. But even if you change to a state trigger, and added the line attribute: unit_of_measurement then your automation would only trigger when the unit of measurement changes from W to something else, like kW for example. Which will never happen. In fact none of those attributes you’ve listed should ever change, so it would be silly to create an automation that triggers off of any of them. But hopefully this highlights what that attribute line does.

Thanks, it definitely helps!