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

Add support for accelerometer axes in Samsung Smartthings Multipurpose Sensor (F-MLT-US-2) #2260

Merged
merged 5 commits into from
Feb 22, 2021

Conversation

declanshanaghy
Copy link
Contributor

@declanshanaghy
Copy link
Contributor Author

This works fine but it has an odd quirk that I'd like to resolve before merging. If any of the axes values haven't changed then that attribute is not included in the next MQTT publish, this causes a value of 0 to show up in Home Assistant for that axis.

It would be preferable to publish the last value each time.

converters/fromZigbee.js Outdated Show resolved Hide resolved
converters/fromZigbee.js Outdated Show resolved Hide resolved
devices.js Outdated Show resolved Hide resolved
@declanshanaghy
Copy link
Contributor Author

Where can I augment the HA MQTT discovery data that's published for this?
I'd at least like to set the unit_of_measurement properly.
Probably a few others too.

See: https://photos.app.goo.gl/uSSoQkHyAHTDgZ8c6

lib/exposes.js Outdated Show resolved Hide resolved
@Koenkk
Copy link
Owner

Koenkk commented Feb 19, 2021

@declanshanaghy
Copy link
Contributor Author

unit_of_measurement

You can fill in the withUnit() part here: https://github.com/Koenkk/zigbee-herdsman-converters/pull/2260/files#diff-d0e9d08b90d447f440404af9227490f81b63e0d3a02ebd8235023c8b1ec72d47R518

Ahh ya. I found that. But setting it to '' caused the check in zigbee2mqtt to fallback on '-' anyway. So I opened another MR to handle that case.

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.

3 participants