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

Adding support for Tuya TS0225 Human presence sensor #8490

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

falkenbt
Copy link

@falkenbt falkenbt commented Dec 18, 2024

Just used the online editor, I hope I got everything right as I wouldn't know how to test this locally.
resolves #23913

@falkenbt
Copy link
Author

I see that illuminance_lux() was removed with #8304 but I'm not sure about the additional datapoints, how is this usually done? Does it need to be added in ../lib/tuya.ts (This is my first PR here, I don't understand most of the code at his point).

[103, 'departure_delay', tuya.valueConverter.raw],
[104, 'entry_filter_time', tuya.valueConverter.divideBy100],
[105, 'block_time', tuya.valueConverter.divideBy10],
[107, 'illuminance_lux', tuya.valueConverter.divideBy10],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[107, 'illuminance_lux', tuya.valueConverter.divideBy10],
[107, 'illuminance', tuya.valueConverter.divideBy10],

And use e.illuminance() instead.

],
description: 'Human presence sensor',
fromZigbee: [tuya.fz.datapoints, fz.ias_occupancy_alarm_1, fz.ias_occupancy_alarm_1_report],
toZigbee: [tuya.tz.datapoints, tzDatapoints],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
toZigbee: [tuya.tz.datapoints, tzDatapoints],
toZigbee: [tuya.tz.datapoints],

model: 'MTD085-ZB',
vendor: 'LeapMMW',
whiteLabel: [
tuya.whitelabel('LeapMMW', 'MTD095-ZB', 'Human presence sensor', ['_TZ321C_4slreunp']),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed (same as model and vendor)

@Koenkk
Copy link
Owner

Koenkk commented Dec 21, 2024

Could you also submit a picture for the docs? This can be done by:

  1. Create a fork by clicking here
  2. Go to the public/images/devices directory, Add file -> Upload files
  3. Upload the files and press Commit changes
  4. Press Contribute -> Open pull request -> update title/description -> Create pull request

Make sure that:

  • The filename is MTD085-ZB.png
  • The size is 512x512
  • The background is transparent (use e.g. Adobe remove background)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New device support]: Tuya TS0225 Human presence sensor
2 participants