Hello! I’m fairly new to HA, and I’m looking to replace the automation I was using in my laundry, I had a vibration sensor on the washer lid, and I would detect tilt and play an audio event on my chimes with the Jarvis voice.
I would like to re-create the same style of automation in HA, but I’m a little bit unsure where to start with the automations and the audio.
Will HA Voice Preview play the audio file?
Does anybody have good automations for washers with a power plug meter they would be willing to share? I think I need to move the vibration sensor to the dryer and use it there, it’s a 220 here in the US so a power plug is out. Any automation help would be greatly appreciated.
It would help if you could to provide some code so we can see what you’ve done so far… We won’t be able to help if all we have is ‘I want to do this thing with this other thing’.
It makes it much easier for us to offer constructive answers if you follow Community Guidelines #9. 11, & 14 by supplying a properly formatted configuration for the automation that you have attempted. Please share the YAML and any errors so we can see what you’ve done.
That’s what I do as well. Because the vibration sensor I have can be a little bouncy, I use a Template Binary sensor with delays to avoid false positives
The following is the automation that uses that sensor as its trigger. It includes a template condition to check that the dryer was active for at least 30 minutes to avoid announcements when someone is just using the dryer for a quick de-wrinkle.
alias: Notify - Dryer - Cycle Complete
description: ""
mode: single
triggers:
- trigger: state
entity_id:
- binary_sensor.dryer_active
from: "on"
to: "off"
for: "00:02:00"
id: complete
conditions:
- alias: The dryer was previously on for at least 30 minutes
condition: template
value_template: >
{{ now() - trigger.from_state.last_changed >= timedelta(minutes=30) }}
actions:
- action: assist_satellite.announce
data:
preannounce_media_id:
media_content_id: media-source://media_source/local/Sound_Effects/minuet.mp3
media_content_type: audio/mpeg
message: The Dryer has completed its cycle.
target:
entity_id: assist_satellite.home_assistant_voice
Yes. It can play an audio file on its own as shown below, or as a preannounce sound as shown in the automation above.
If you have the file locally, make sure it’s in a folder set to be accessible as a media source.
You can also specify a URL for non-local files:
action: media_player.play_media
target:
entity_id: media_player.home_assistant_voice
data:
media_content_type: music
media_content_id: "https://sound-effects-media.bbcrewind.co.uk/mp3/07071033.mp3"
Thanks everybody! I think the primary question I was unsure of was the HA voice capabilities with the local files, I’ll dig in on the rest and figure it out. Much appreciated on the tips for the washer and dryer!