I am having issues with creating a good automation with a sensor that keeps going back to “Cleared” meaning no vibration, like it is resetting its counter.
In the past with other sensors like a power sensor I can do something like; if power consumption is high. Wait until it is off for 6 minutes and then send voice announcement.
Please keep in mind that the dryer was on the entire time. I tried different things like setting vibration sensor to low, med, high, highest. Similar results.
So how would I create an automation where I am searching for a minimum of 5 “motion detected” over the course of 5 minutes = Start
Wait for motion to be set to no motion detected for 5 minutes then proceed to send out voice announcements.
Trigger "Detecting Motion"
For Duration
3 minutes.
This condition does not ever come true.
Another thing I tried
Trigger "Detecting Motion"
dont set duration timers
AND IF
No Motion
For Duration
3 Minutes
Except this will probably trigger way too often with too many false positives.
Still having issues but here is the direction I have taken.
Created a new sensor/helper using YAML under configurations.
# Ties to a History Stats Helper
# This is keeping track of how often sensor switches to on in five minutes
sensor:
- platform: history_stats
name: helper_vibration_dryer
entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
state: "on"
start: "{{ now() - timedelta(minutes=5) }}"
end: "{{ now() }}"
After a lot of troubleshooting (it did not originally look like what I just posted above).
It does seem to measure stuff… not sure why its doing decimal increments.
Anyways my automation does not work because it doesnt do jack.
alias: Dryer Vibration Automation
description: Notify when dryer stops running
triggers:
- entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: template
value_template: |
{{ states('sensor.helper_Vibration_Dryer') | int >= 5 }}
sequence:
- target:
entity_id: input_boolean.dryer_running
action: input_boolean.turn_on
data: {}
- conditions:
- condition: state
entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
state: "off"
for:
minutes: 5
sequence:
- target:
entity_id: input_boolean.dryer_running
action: input_boolean.turn_off
data: {}
- data:
title: Dryer Update
message: Dryer has halted or finished its cycle.
action: notify.notify
- data:
cache: false
entity_id: media_player.googlehome9088
message: Dryer has halted or finished its cycle.
action: tts.cloud_say
mode: single
guessing its because I am searching for values of 5, and higher but I am stuff at 0.XX values?
Anyone know why?
since int is designed for whole numbers, will it be as easy as doing
Create a sensor to keep track of how often it goes into a “motion” mode, indicating vibrations are detected.
Create a sensor in configuration.yaml file.
# This is keeping track of how often it switches to "ON" or motion detected in five
# minutes
sensor:
- platform: history_stats
name: helper_vibration_dryer
entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
state: "on"
type: count
start: "{{ now() - timedelta(minutes=5) }}"
end: "{{ now() }}"
Create an input Boolean in Helpers
name: dryer_running
icon: mdi:fire
Entity ID: input_boolean.dryer_running
Area: Optional
Label: Optional
Voice Assistant: No need to expose them
Enable: true
Visible: true
Create the automation once the prerequisites are setup
alias: Dryer Notification
description: Notify when dryer stops running
triggers:
- entity_id:
- sensor.helper_vibration_dryer
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: template
value_template: |
{{ states('sensor.helper_Vibration_Dryer') | int >= 5 }}
sequence:
- target:
entity_id: input_boolean.dryer_running
action: input_boolean.turn_on
data: {}
- conditions:
- condition: state
entity_id: binary_sensor.third_reality_inc_3rvs01031z_motion
state: "off"
for:
minutes: 5
sequence:
- target:
entity_id: input_boolean.dryer_running
action: input_boolean.turn_off
data: {}
- data:
title: Dryer Update
message: Dryer has halted or finished its cycle.
action: notify.notify
- data:
cache: false
entity_id: media_player.googlehome9088
message: Dryer has halted or finished its cycle.
action: tts.cloud_say
mode: single
So far its been working great for me. Hope this helps others.
@chris1bass THANK YOU. I got the same sensor and was trying to do the same thing, this was a huge help. I actually bought three of them and did some science - if it helps, I noticed that different spots on my dryer brought more consistent “motion detected” results. For my dryer, it was more toward the front = more consistent with the sensitivity on the sensor turned all the way up.
Question what type of dryer design do you have? For example, this is mine.
I just assumed the fat rounded door would result in inconsistent measurements, but I haven’t moved it around much yet.
My next-door neighbor with his car that is louder than a Harley Davidson at startup keeps triggering it once in a while for me, so I am still fine tuning it. My windows rattle for goodness’ sake lol.
Thank you, Chris! Just set this up with my 3rdReality sensor!
A heads up to anyone coming after, ifyou want to save a step when creating this or cleaning up your automations, you can create your helper Boolean as a template instead and use the same {{ states('sensor.helper_Vibration_Dryer') | int >= 5 }} to bypass needing the automation! You can then have it report as “Running” or “Vibration” as you wish and tie it to your washer/dryer. So handy!
Just set this up so we’ll how well it works for me. One thing I’m trying to work around and figured I’d post here as I explore this is dealing with a “wrinkle release” cycle. I’m curious to see if this will detect that the dryer has stopped based on the fact that it never “really” stops, but there is just a longer pause between vibrations. I have a load in now so I’ll keep an eye on it and report back.