Your best bet would be to buy another sensor that is supported by HA and use that in a script on HA instead.
I personally use ZWave devices for a lot of things as they tend to work out of the box and dont really require any coding or flashing. Currently using an Aeotec Garage door opener but you’ve obviously already got this part working.
I’ve read a few people on here using ZWave tilt sensors that are around the $30 mark so could help with your problem once integrated as an automation in HA.
@ezz9 can you confirm that using “localtuya” the state of the garage door opener is exposed to HomeAssistant (i.e. HA can see if garage is open or closed)?
I assume it does, given your previous comment on this post, suggested that is the problem you were looking to resolve.
Do you mind sharing the “localtuya” YAML syntax your using for your garage door opener? Many Thanks.
Hey @sebdoan
I used HACS to install the “localtuya” integration - and then configured with the main integration web interface. it was some trial and error finding the right setup, below is what’s working for me.
using version 3.0.1 at the moment, something in the updates something broke and I don’t have time to play so rolled back.
Create a new account on iot.tuya.com and make sure you are logged in. Go to Cloud -> Project in the left nav drawer and click “Create”. After you’ve created a new project, click into it. The access ID and access key are equivalent to the API key and API secret values need in step 6.
Go to App -> App SDK -> Development in the nav drawer.
Click “Create” and enter whatever you want for the package names (for the Android package name, you must enter a string beginning with com.).
Go to Cloud -> Project and click the project you created earlier. Then click “Link Device”. Click the “Link devices by Apps” tab, and click “Add Apps”. Check the app you just created and click “Ok”.
On the same page, click “API Group” on the left side. Change the status to Open for the following three API Groups by clicking “Apply” for each line, entering any reason, and clicking “OK”:
“Authorization Management”,
“Device Management”,
“Device Control”,
“User Management”,
“Network Management”,
“Data Service”
“Device Statistics”.
3. Install and run uBuntu or any other Linux Distro
@ezz9 I’ve used localtuya v3.1.0 and can confirm it doesn’t work for me either. I’m using the configuration via the UI as you are doing.
I’ve found that localtuya v3.0.1-v3.0.3 work the same for me. What works:
State sensor of the Garage Door works
Close command works
What doesn’t:
Stop/Toggle command only works when is garage door is open
Open command does nothing (works as a toggle command when garage door is open)
Given that localtuya accurately gives me the sensor state I’ve combined it with the standard tuya integration to create a template switch/cover that works exactly as I expected. It’s a lot of workarounds but in the end it works…
Why use the standard Tuya integration for the switch. Is it possible to configure the switch part in the Garage Opener. When I try I only get presented with the options concerning current. No on/off functions. Or have I missed something
I have been trying to use the same config but for me only the door sensor works, the actual open/closing doesnt work. I have to use the cloud tuya to open close (which doesnt have the door sensor) so its mixed bag at the moment and I was hoping someone could point me in the right direction. Tried all possible combinations of DPs and all versions, still no luck
@fhratul what worked for me is I added a switch then added a binary sensor to that switch like below:
Step 1:
Step 2: add binary sensor to detect door sensor state
step 3: Then i added a button on lovelace to detect garage state and toggle door like so:
I have the same issue, hopefully my solution works for you too. The way I get around it, is to combine the sensor from LAN with the button from the CLOUD via a “template switch”. This template switch will work as expected.
NOTE: you’ll see that i use conditions to check the sensor just before it executes the action to open or close. I also use a 10 second delay and re-execute the action to open, because sometimes the first request to open does not work.
Anyone else had any luck integrating a garage door? I have just installed one and direct integration with local tuya isn’t working. Might have to try your suggestion
The problem with sensors and the Tuya integration is that the Tuya integration doesn’t update the state right away. There’s therefore no point in bringing a Tuya sensor into HA; the delay makes it useless. (I did a test. I set up an automation within the Tuya app, to have the garage door sensor change the state of a Tuya plug, which does integrate as a device in HA. The problem is that the change in state takes some time to be visible in HA.
I have had more success with the Nortek garage door tilt sensors (Z-wave) which work perfectly.
I do have a secondary issue with the Tuya garage door controller, which is that HA treats it as a switch, but in the Tuya app it works as a momentary switch. I’ve tried automations in HA that detect the state change and then toggle the switch; but they don’t work right (door will stop in mid-lift or mid-fall). Going to try the momentary switch integration and see if that helps.
I added a switch and a binary sensor like you in the screenshot but the sensor is not the signal from the sensor of the door opener its just a “virtual sensor” or similar, have you figured out a way to set the correct sensor state onto this binary sensor in HA?
Hello,
I have the same problem, I am unable to make the garage door show the status. Now it is no longer possible to use the old version of localtuya. Maybe there is already a way ?? maybe have you quit and are using something else?
Instead of relying on cloud based Tuya integration, go with localtuya, add your garage door device as switch and create a garage door cover using yaml. Please take a look at this: Tuya Garage Door Opener with sensors - #22 by fuatakgun