Hello everyone, I need the help of experts
I have shelly1 pm connected to a washing machine and checking its power consumption,
I made an automation that every time it reaches the power consumption range and finishes the work, an alert will be sent to the cell phone and everything works great,
I have one problem, the power consumption remains the same until the clothes are taken out of the machine, I want to add a condition that the automation will work every 30 minutes or another idea,
can anyone help me?
Thank you
Can you show us your current automation YAML? In addition, a power consumption graph would be super helpful.
If you mean you want to be notified every 30 minutes until the washing machine is unloaded, consider using the Alert integration.
yeah, of course
- id: ‘1619360379123’
alias: Dryer alert
description: ‘’
trigger:
- type: power
platform: device
device_id: 0927bda2727f697f94eaae2068a9b42d
entity_id: sensor.shelly1pm_d8bfc019bbb6_power
domain: sensor
above: 2.9
below: 3.3
for:
hours: 0
minutes: 0
seconds: 3
milliseconds: 0
condition: []
action: - service: notify.mobile_app_netta
data:
message: מייבש כביסה סיים לעבוד
title: 'מייבש כביסה ’ - service: notify.mobile_app_noy_2
data:
message: מייבש כביסה סיים לעבוד
title: 'מייבש כביסה ’
mode: single
If you just need to be notified when the washing machine is finished (after being used), you just need below numeric_state
trigger-
trigger:
- platform: numeric_state
entity_id: sensor.shelly1pm_d8bfc019bbb6_power
below: '5'
for: '00:05:00'
condition: []
action:
- service: notify.mobile_app_netta
data:
message: מייבש כביסה סיים לעבוד
title: 'מייבש כביסה ’
- service: notify.mobile_app_noy_2
data:
message: מייבש כביסה סיים לעבוד
title: 'מייבש כביסה ’
If you use above
and below
numeric_state trigger, the automation will be triggered if the numeric_value
is outside the range and coming back inside your defined range.
I suggest you take a look at your power consumption graph to determine the best numeric_state
below threshold to know if the washing machine is actually done.
Just for your knowledge (for your other automation, if needed), if you want an automation to work with a minimum gap of 30 minutes after being triggered, you can add a condition-
- condition: template
value_template: >-
{{ (as_timestamp(now())-as_timestamp(state_attr('automation.my_automation', 'last_triggered') | default(0)) | int > 1800) }}
You will need to change automation.my_automation
to your automation entity_id
. Next, change 1800
in seconds (to your desired gap between automation to be triggered).