TP-Link HS110 Energy read-out problem

Hey all,

This is actually a cross-posted, but since the other thread hasn’t moved in a month I thought it would better fit having it’s own topic.
I’ve got a TP-Link HS110 that I use to monitor a household appliance, but there is a problem which I cannot pinpoint whether it’s in the switch or Hass.io. I’ve noticed that HA often sends me alerts during the night that the laundry is finished when it actually wasn’t in use. FYI, I don’t restart HA or the switch during the night.
It seems that every once in a while that plug has a small power peak (although i don’t see it in HA history) and that then triggers my automation:

automation:
  - alias: Action - Set washing machine as finished
    id: '1514637057229'
    trigger:
    - platform: numeric_state
      entity_id: sensor.washingmachine_watts
      below: '10'
      for:
        minutes: 10
    condition: []
    action:
    - service: input_boolean.turn_on
      entity_id: input_boolean.washingmachine_finished
  - alias: Notify - Washing machine finished
    id: '1514634021340'
    trigger:
    - platform: state
      entity_id: input_boolean.washingmachine_finished
      to: 'on'
    condition:
    - condition: state
      entity_id: group.hometracking
      state: 'home'
    action:
    - service: input_boolean.turn_off
      entity_id: input_boolean.washingmachine_finished
    - service: script.notify_engine_present_people
      data_template:
        title: 'Washing Machine:'
        message: "The washing program is finished. Please take out the laundry."
  - alias: Notify - Washing machine finished when someone arrives
    id: '1514631344131'
    trigger:
    - platform: state
      entity_id: group.hometracking
      to: 'home'
    condition:
    - condition: state
      entity_id: input_boolean.washingmachine_finished
      state: 'on'
    action:
    - service: input_boolean.turn_off
      entity_id: input_boolean.washingmachine_finished
    - service: script.notify_engine_present_people
      data_template:
        title: 'Washing Machine:'
        message: "The washing program has been finished for {{ ((as_timestamp(now())-as_timestamp(states.input_boolean.washingmachine_finished.last_updated))/60)|round(0) }} minutes. Please take out the laundry."

I think setting a condition on turning on the input_boolean would solve the issue. A condition such as, if the power usage has been >0 W in the past 30 minutes. But this conflicts with the trigger. Any suggestions?

You could set an input boolean when the washing machine starts and use this as a condition.

Ah, that’s a clever solution. I’ll try that as a workaround.