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

New Device file for Tapestry Presence Sensor Z1 (THPZ1) #7250

Merged
merged 6 commits into from Mar 25, 2024

Conversation

taby1
Copy link
Contributor

@taby1 taby1 commented Mar 21, 2024

The new vendor file passes all the tests, but as far as I can tell it isn't documented anywhere how to write/test .ts vendor files, so if someone here can tell me how to do that I'd be happy to make sure it still works. The new tapestry.ts vendor file was derived from this external converter file, which has been tested and works:

const {occupancy, temperature, humidity} = require('zigbee-herdsman-converters/lib/modernExtend');
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;

const definition = {
    zigbeeModel: ['Presence Z1'],
    model: 'Presence Z1',
    vendor: 'Tapestry',
    description: 'Tapestry Presence Sensor Z1 Occupancy and Temperature/Humidity Sensor',
    extend: [],
    fromZigbee: [fz.temperature, fz.humidity, fz.occupancy],
    toZigbee: [],
    exposes: [e.occupancy(), e.temperature(), e.humidity()],
    meta: {},
};

module.exports = definition;

src/devices/tapestry.ts Outdated Show resolved Hide resolved
src/devices/tapestry.ts Outdated Show resolved Hide resolved
taby1 and others added 3 commits March 25, 2024 10:57
Updated description text

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Removed redundant meta property

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
@Koenkk Koenkk merged commit e1f014f into Koenkk:master Mar 25, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Mar 25, 2024

Thanks!

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.

None yet

2 participants