Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for window/door open sensor #257

Closed
bigretromike opened this issue Dec 18, 2020 · 2 comments
Closed

Support for window/door open sensor #257

bigretromike opened this issue Dec 18, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@bigretromike
Copy link

Hello,

I wanted to add door/window/opening sensor, but looks like im failing because its not supported.
Its very simple device.

{"activeTime":1597068593,"devId":"*delete*","displayOrder":0,"dpMaxTime":1608050912746,"dpName":{},"dps":{"1":false,"3":"high"},"errorCode":0,"iconUrl":"https://images.tuyaeu.com/smart/icon/ay1525749833414yotNt/92722d1b64636ed1dfe3107187643324.jpg","isShare":false,"key":"*delete*","lat":"","localKey":"*delete*","lon":"","moduleMap":{"mcu":{"cadv":"","isOnline":true,"verSw":"1.0.0"},"wifi":{"bv":"5.42","cadv":"","isOnline":true,"pv":"2.2","verSw":"1.1.1"}},"name":"sypialnia","productId":"*delete*","resptime":0,"runtimeEnv":"prod","timezoneId":"*delete*","uuid":"*delete*","virtual":false},

dps: 1 - open "true", close "false", 3: "high" batter, "middle" batter, ?low? battery (I dont have any with low but I have 1 with high and one with middle) and that would confirm whats inside smartlife application I can see open/close and high/medium battery, and history which is store in cloud.

@postlund
Copy link
Collaborator

You can add it using a binary_sensor for open state and a regular sensor for battery, should work fine. Most of these sensors are battery operated however and will go to sleep most of the time, so Home Assistant will lose connection to it and the entities become unavailable (so you don't have the state anymore). I intend to add support to keep state when connection is lost, but I haven't come around to fix that yet.

This has been reported before in #89, so I will close this as duplicate.

@postlund postlund added the duplicate This issue or pull request already exists label Dec 18, 2020
@bigretromike
Copy link
Author

I tried, but it didnt connect. But I didn't know the part about device being sleep. that would explain why I didnt have them available in integration discovery. I will move onto #89 thanks

SKULSHADY pushed a commit to SKULSHADY/localtuya that referenced this issue Dec 28, 2024
SKULSHADY pushed a commit to SKULSHADY/localtuya that referenced this issue Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants