The task is to get Alexa to trigger an announcement that provides the details of the time remaining on my LG ThinQ enabled washer and dryer. Alexa does not have access to that data but HA does. Below is the script that HA can use to announce that detail. Now the task is to get Alexa to trigger that script.
I found AI answers for how to get Alexa to call a HA script no longer work so here is a slightly kludgy work around. Previously, Alexa would show an exposed HA script as a device. That device could then be placed in an Alexa scene with the voice command that would then trigger that HA script.
Alexa no longer presents HA exposed scripts as a device, but they are visible in the Alexa group’s creation dialog. The kludgy trigger now is to say “Alexa group name on”. In this case “Alexa Dryer Time on”. Better than nothing until Alexa can access the LG ThinQ time remaining data and/or scripts can be exposed and shared to Alexa scenes. Create the script via settings>automations> scripts and then expose the HA script to Alexa via the settings>voice assistants>alexa. Here is my HA ThinQ dryer time remaining script.
action: notify.send_message
target:
entity_id:
- notify.all_dots_announce
- notify.lance_s_echo_show_8_3rd_gen_announce
- notify.lance_s_2nd_echo_dot_announce
data:
message: >
{% set sensor = 'sensor.dryer_2' %} {% set time = state_attr(sensor,
'remain_time') %} {% set completed = state_attr(sensor, 'run_completed') %}
{% if completed == 'on' %}
The dryer cycle is finished.
{% elif time and ':' in time %}
{% set parts = time.split(':') %}
{% set h = parts[0] | int %}
{% set m = parts[1] | int %}
{% if h > 0 %}
The dryer has {{ h }} {{ 'hour' if h == 1 else 'hours' }} and {{ m }} {{ 'minute' if m == 1 else 'minutes' }} remaining.
{% elif m > 0 %}
The dryer has {{ m }} {{ 'minute' if m == 1 else 'minutes' }} remaining.
{% else %}
The dryer is finishing up now.
{% endif %}
{% else %}
The dryer does not appear to be running.
{% endif %}
Can you have the washer changing from a running status to a finished status be the trigger and the Alexa announcement be the action in your automation?
Yes the ThinQ skill in Alexa will support that directly. Just add the skill and look at the device (Dryer or Washer) settings and toggle the announcement button pictured below
I have a GE washer and dryer. I set up a HA automation where if one of the two finishes a run then it makes and announcement and in the announcement it mentions the remaining time on the other if it is currently running. So if the Washer finishes a load and the Dryer is still running it will tell you the wash is done and the dryer has x minutes remaining.