06-22-2023 07:57 AM
Has anybody else run into this?
I'm attempting to automate a temperature schedule for my Midea U-Shaped AC Unit via the Script Editor.
Everything works great except the Script Editor complains that setting device.command.OnOff to false (I'm pretty sure that's how you turn off this device) throws an error that [OnOff] with action.devices.types.AC_UNIT is not currently supported - screenshot below.
Setting device.command.OnOff to true works perfectly & throws no errors.
I'm not really sure if this is a bug in the Script Editor, a problem with the Midea API / integration, or something I'm doing wrong. It's not the end of the world, but I'd love to use Google Home's presence detection to turn this AC unit off when we leave the house, as it's not natively supported in the Away Presence Sensing routine.
Troubleshooting steps I completed:
06-23-2023 09:49 AM
The same is happening with heater device types unfortunately and seems to be intentional for now. I really hope that there will not be any limitations in the future. Otherwise it can not become a one-stop solution for all automations (like Home Assistant).
07-05-2023 09:07 AM
Did you manage to get it working?
I have the same problem with my Gree AC. Can turn it on via automation, but no luck setting on: false
07-06-2023 04:03 PM
I have found the solution at least for ambi climate controlled aircon units. Try use the following:
type: device.command.ThermostatSetMode
thermostatMode: heat,cool,on,off
I just select off and the automation turned off the aircons
07-10-2023 08:29 AM
My midea unit sadly doesn't support the "off" value under device.command.ThermostatSetMode.
Nothing works yet for me. Anybody else have any luck?
07-14-2023 08:47 AM
I ran into the same issue. Worked around it by running an OK Google command on my smart speaker:
actions:
- type: assistant.command.OkGoogle
okGoogle: Turn off the airconditioning
devices: Google Home - Living Room
Please note that my AC device is called "airconditioning", so you may need to adjust the device name.
07-30-2023 05:20 AM - edited 07-30-2023 05:40 AM
I also tried this before, but it turns out that OkGoogle command makes the home switched the presence state from Away to Home again with the below reason:
"Because a device was voice controlled: [my speaker name]"
07-31-2023 10:23 AM
Updated:
For a workaround, I first set up a scene ("Power off Air" in my case) in the third-party app for my universal remote controller and activated the scene by device.command.ActivateScene
actions:
- type: device.command.ActivateScene
activate: true
devices: Power off Air
02-09-2024 03:50 AM
It worked. I thought your solution was very clever.
05-29-2024 03:43 PM
Hi could you help me? I use the broadlink app to create scenes to disable the AC unity and the device works on the broadlink app and in the google home app, but i cant seam to integrate the scenes in the google script? how exatly did you create the scene and how did you integrate the scene in the google script? i tried to do exatcly as you explained, but the script says that my scene name is not a valid device.
05-29-2024 11:23 PM
In my case, I created a Tap-to-Run scene in the Smart Life app. The name of the scene is "Turn on the Air".
On the Google Home side, my exact script is:
metadata:
name: Turn on the Air
description: Helper functions of Air
automations:
starters:
- type: assistant.event.OkGoogle
eventData: query
is: turn_on_the_air
- type: assistant.event.OkGoogle
eventData: query
is: Turn on the Air
actions:
- type: device.command.ActivateScene
activate: true
devices: Turn on the air
You can safely ignore that turn_on_the_air. I placed that to make this look like a library function with an entry point. Thus, other scripts can trigger this function with that entry point.
05-30-2024 05:27 AM
Hi Rafael.
I did exactly as Eric mentioned.
Follow my script, my scene is in Portuguese (BRAZIL).
"
- type: device.command.ActivateScene # Activate or deactivate a scene.
activate: true
devices: Desligar o A.C. da sala
"
When you type this command to activate scenes, Google Home will already show the scenes that are available.
If they didn't appear, try going to Google Home Configuration, Google Compatible Services and linking Broadlink again on Google Home.
11-30-2023 12:27 PM
that work for me. thank you.
02-09-2024 03:49 AM
It worked!!!
09-10-2023 01:59 AM
I filed a bug for this: https://issuetracker.google.com/issues/299713666
11-22-2023 02:33 AM
Same isue!
02-09-2024 03:36 AM
I'm also having the same problem, when the device is an air conditioner, when it's a button or smart socket it accepts the command without a problem.
02-21-2024 03:39 AM
I do not see the logic that the turn on command is supported and the turn off function is not. Right now I made it turn off with the help of an unused smart switch channel. I turn that switch on in the script where I turn on the AC. And made another automation in the google home app if that switch is turned off then turn off the AC (because the app allows you to turn it off for some reason :D).
I hope they will allow to turn off these devices in the future, because right now it is kinda strange to say at least
02-21-2024 04:38 AM
For a workaround, I first set up a scene ("Power off Air" in my case) in the third-party app for my universal remote controller and activated the scene by device.command.ActivateScene
02-21-2024 04:41 AM
Yea I saw that but unfortunately I could not find any good universal remote app that is capable to make scene and integrate it into google home. At least that's what I understood in your solution correct me if I am wrong 🙂
02-21-2024 04:53 AM
I understood. I use broadlink to control my devices via infrared, with it I can create scenes and overcome this problem. If your air conditioning already has WiFi, you may have this function in the manufacturer's app...
02-21-2024 05:02 AM
Unfortunately Gree doesn't have any automation editor in its app or I didn't find it yet even if it has wifi module. The maximum that the app can do is turn on/off based on time.
If I am not mistaken to make your solution work you have to be in the same area with the machines to infared make its magic right? Unfortunately my phone does not have any infrared blaster to use these apps
Thank you for your reply it is now clear what you did 🙂
05-29-2024 04:10 PM
hi guys the workaround for the AC from EricTsengTy works really well, but in the broadlink app you need to create a scene or retrato(in portguese) not a routine!