Tuya motion sensor is not supported in Home Assistant

+1 for the Tuya motion sensor component!!!

Really wanted with the capibility to see Tuya/SmartLife sensors and alarms!

1 Like

+1 for the Tuya motion sensor component!

+1 for tuya sensor component!!

+1 for the Tuya motion sensor component!

I recently switched from Domoticz (RPi) to HomeAssistant (docker QNAP) The Tuya switches do work flawlessly thumbs up

+1 for the Tuya motion sensor component!

But I think the problem is located on the Tuya side. The PIR motion sensor is advertised to be compatible to Alexa, Google Home and IFTTT. Looking into the properties page of the PIR motion sensor in the SmartLife App IFTTT will be the only service to be supported. But even there it is not working for me. Besides that the IFTTT WebHook mechanism is much to laggy for my needs.

SmartLife scenes and automations are all listed as scenes in Hass (same in Alexa). That seems to be bug of the Tuya cloud service too, that automations become a scene.

I tried a work around by creating a simple SmartLife automation triggered by the motion sensor just sending a notification at night time. But I did not manage to get any trigger information from SmartLife scenes or automations in hass. So the only way will be to trigger a real tuya switch and to check its state in hass or does anyone know how to get the state of SmartLife automations in hass?

I would also very much like to see support for the Tuya Motion sensor :blush::crossed_fingers:

+1 for support of tuya motion sensor.

I was looking for this natively as well, however i have a decent workaround for my own scenario for these to work with home assistant in a round about way.

My use case for the cheap tuya / smart life pir’s was to dim the landing lamp on when motion detected at night and then go off after 2 minutes.

Then in the morning between 7am and 9am, turn on the downstairs lights for the same motion trigger.

I had a couple of the the tuya / smartlife wifi bulbs ( which are supported ) to satisfy the landing light dimming portion. I was then able to use the trigger of the tuya wifi bulb state turning “on”, within home assistant to trigger other actions during time conditions.

Tuya PIR sensor -> Tuya wifi bulb dim on at night using tuya App automation -> HA Automation trigger watching tuya bulb state between 7am and 9pm to turn on downstairs lights.

The tuya kit is so cheap, this will suffice for me in the meantime.

My advice is to use a cheap HA supported tuya bulb OR socket switch as go between so HA can monitor the state of the device the pir sensor triggers in the tuya app.

+600 from me

Ha, nice. I did kinda the same thing. I have an unused socket on a smart power strip that I just toggle on and off with motion. That keys an automation in HA.

But ya, I wish there was support (still).

For me too, sensor integration would be highly appreciated

Please share some code samples or even better a full walk-through. This would helps lots of people and open up a lot of practical applications.

I also have the PIR sensor in my home, it shows up in HA as a scene… but that’s only because it was part of a test automation I set up in the TuyaSmart app. As soon as I remove the automation there, the scene is gone from HA.

+1 for me :slight_smile:

The absolute easiest way is to create an automation in the Tuya app that switches on a spare tuya socket device. This then acts as a dummy switch for the PIR. Now you can base your automations on the status of the socket/switch. To turn things off just create a timer in ha that switches the socket / switch off again after your desired time span.

1 Like

I’ve figured out another work around using Tasker for the door sensors. Haven’t tried with the motion sensors yet but I imagine it would also work. I’ve created a binary sensor in HA for the door sensor. When the TUYA/Smart Life app sends it’s notification I use the notification intercept in Tasker to send an event to HA to change the state of the binary sensor. Takes maybe a second or 2 for the process to complete and obviously only works on Android, but it’s another option.

I tried IFTTT webhooks but found it was a unreliable, and quite slow when it did work.

But definitely +1 for some native sensor support

2 Likes

Nice idea. My method of activating an unused switch via a Tuya scene takes about 4 seconds. I’ve been trying to keep my setup limited to as few apps as possible but it looks like I might have to finally get Tasker and give your method a try.

All,

The Mirabella Smart Home (Tuya based) motion sensor now works well in Home Assistant, if flashed with the latest version of Tasmota.

I flashed with Tuya Convert, added the recommended template and TuyaMCU commands from the Tasmota supported devices wiki, then added to my config:

  - platform: mqtt
    name: "Garage PIR"
    state_topic: "GaragePIR/tele/RESULT"
    value_template: "{{ value_json.TuyaReceived.CmndData | truncate(9, false, '') }}"
    payload_on: "650100010"
    off_delay: 3
    device_class: motion

It’s possible (probable) that other Tuya based motion sensors will work with this method. The OP on the Tasmota wiki also refers to reed switches so they may also work with this method.

Details on flashing and Tasmota configs are in the Mirabella thread.

3 Likes

Hey @Phill_Healey here is the config with which I got it working! Hope it helps you

input_boolean:
  door:
    name: Door Open
    initial: off
    icon: mdi:door

emulated_hue:
  host_ip: 192.168.X.X
  listen_port: 80
  expose_by_default: true
  exposed_domains:
    - input_boolean

Any chance you could explain that a little?