Open rbreahna opened 12 months ago
Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
tuya documentation tuya source (message by IssueLinks)
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
HI @frenck. I'm also facing same problems.
@zlinoliver @frenck Just adding some details here that can help the team to solve this problem.
First of all, device is a ZY-M100 24G Wi-Fi
. On Home Assistant Tuya integration, it appears as WIFI24G Presence Sensor (n3bow00a2vpwgtvx)
I've downloaded the diagnostics when sensor was in different states. Basically, status_range
is the same. Here you can notice that device has 5 features.
...
"status_range": {
"presence_state": {
"type": "Enum",
"value": {
"range": [
"none",
"presence"
]
}
},
"sensitivity": {
"type": "Integer",
"value": {
"unit": "",
"min": 1,
"max": 10,
"scale": 0,
"step": 1
}
},
"far_detection": {
"type": "Integer",
"value": {
"unit": "M",
"min": 150,
"max": 550,
"scale": 2,
"step": 100
}
},
"target_dis_closest": {
"type": "Integer",
"value": {
"unit": "M",
"min": 0,
"max": 1000,
"scale": 2,
"step": 1
}
},
"illuminance_value": {
"type": "Integer",
"value": {
"unit": "LUX",
"min": 0,
"max": 20000,
"scale": 0,
"step": 1
}
}
}
...
"status": {
"presence_state": "none",
"sensitivity": 6,
"far_detection": 150,
"target_dis_closest": 0,
"illuminance_value": 565
}
"status": {
"presence_state": "presence",
"sensitivity": 6,
"far_detection": 150,
"target_dis_closest": 150,
"illuminance_value": 665
}
And finally, the most desired state, when presence is detected:
"status": {
"presence_state": "move",
"sensitivity": 6,
"far_detection": 150,
"target_dis_closest": 150,
"illuminance_value": 857
}
In my opinion, the problem is that the statuses are being mapped incorrectly. Instead of move, it emits presence. Instead of presence, it emits move.
It would be great if we could also have access to the 3 types of status: none, move and presence.
It would also be great if we could have an entity for the illuminance sensor.
I was wondering if any issue was already opened, since I had the same thought: I couldn't see the light sensor entity and the target distance entity. This thing it's fairly basic with just the movement detection :) Thanks for any update.
Bump. I'm using the ZY-M100 wifi 24g. I get the same sensor (motion) and configurations (far/near detection + sensitivity) as @dentex. The two main sensors I'm missing is:
FYI, I also use the zigbee variant which does have these sensors available in HA.
@Tuya @zlinoliver @frenck, can you give us any update whether or not this is in the pipeline to implement? I'm glad to help where I possibly can.
I'm also using the ZY-M100 wifi 24g. And I'm also interested in the missing sensors in Home Assistant:
The Zigbee-variant does have these informatie availaible in HA, but I want to switch to the WIFI-version.
@tuya @zlinoliver @frenck: can you tell me of there is a update coming or that this isn't in the pipeline to implement.
There is a work around for now if you have to wifi version if you need it for simple movement activation automations
Use Virtual Switch in Home Assistant to trigger automations
Whilst there is no way to pass Lux values in Smart Life you could use Lux Automation to turn on and off an extra virtual switch to trigger light checks for HA automations
Thank you for this workaround.
Unfortunately, that does not solve the problem with the missing lux value. It is also important for me to be able to use it.
So I'm hoping for an update that will make these values available as well. Otherwise I have to switch to the Zigbee version of the sensor.
I created another virtual switch which I used an automation in app to switch on if 20 was below x and turned off if above 20 then in home assistant I just prior to turning on lights with motion checked if it was dark enough if virtual switch was on.
If you wanted a range you could get funky and have a switch for 50 lux or under a switch for between 50 and 100 etc
Works for my needs anyhow
Thank you for the tip. That is indeed a great way to come up with a temporary alternative. Hopefully there will also be full integration of the WiFi version.
There is a work around for now if you have to wifi version if you need it for simple movement activation automations
* Setup a virtual switch in Smart Life [Here](https://developer.tuya.com/en/docs/iot/manage-virtual-devices?id=Ka4725tiyfhg0) make sure the virtual device works with home assistant ( I went with UK wifi plug ) * Check Virtual switch shows in Home Assistant (restart probably needed) * Setup in Smart Life automation scene to switch on virtual switch when movement detected * Repeat setup but for turning off when no movement
Use Virtual Switch in Home Assistant to trigger automation
Whilst there is no way to pass Lux values in Smart Life you could use Lux Automation to turn on and off an extra virtual switch to trigger light checks for HA automations
Dude, this is amazing thank you. I bought a Tuya Wifi Presence Sensor (HPD WF LD2420) and not even the presence would detect properly in HA. The device appeared but only had presence which would never update. Your workaround saves the day!
I created another virtual switch which I used an automation in app to switch on if 20 was below x and turned off if above 20 then in home assistant I just prior to turning on lights with motion checked if it was dark enough if virtual switch was on.
If you wanted a range you could get funky and have a switch for 50 lux or under a switch for between 50 and 100 etc
Works for my needs anyhow
I understand that with a virtual switch we can report an on/off state.
Is it possible to create a virtual dimmer switch etc. so that we can actually report the lux value?
The problem
The tuya ZY-M201-WIFI24G sensor is only partially supported with just a few entities unlike the ZigBee version whe using the tuya cloud Integration. There is only a binary sensor that doesn't do the job and many config options as well as entities are missing compared to the ZigBee version.
What version of Home Assistant Core has the issue?
core-2023.11.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Tuya
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tuya
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response