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

update 3r waterleak ts #7916

Merged
merged 6 commits into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/devices/third_reality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ const definitions: DefinitionWithExtend[] = [
fromZigbee: [fz.ias_water_leak_alarm_1, fz.battery],
toZigbee: [],
ota: ota.zigbeeOTA,
extend: [
Copy link
Owner

Choose a reason for hiding this comment

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

Could you also expose these features?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi,we don't need this temporarily, it will be added later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Koenkk Can you merge it

Copy link
Owner

Choose a reason for hiding this comment

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

hi,we don't need this temporarily, it will be added later

If it's not needed, why was the cluster added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I didn't explain clearly. Adding this cluster is only used on the dev console menu for the time being, and not on the expose menu.

Copy link
Owner

Choose a reason for hiding this comment

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

I see, thanks!

deviceAddCustomCluster('r3Specialcluster', {
ID: 0xff01,
manufacturerCode: 0x1233,
attributes: {
siren_on_off: {ID: 0x0010, type: Zcl.DataType.UINT8},
siren_mintues: {ID: 0x0011, type: Zcl.DataType.UINT8},
},
commands: {},
commandsResponse: {},
}),
],
exposes: [e.water_leak(), e.battery_low(), e.battery(), e.battery_voltage()],
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
Expand Down Expand Up @@ -209,6 +221,14 @@ const definitions: DefinitionWithExtend[] = [
extend: [battery({voltage: true}), forcePowerSource({powerSource: 'Battery'})],
ota: ota.zigbeeOTA,
},
{
zigbeeModel: ['3RSM0147Z'],
model: '3RSM0147Z',
vendor: 'Third Reality',
description: 'Soil sensor',
extend: [temperature(), humidity(), battery(), forcePowerSource({powerSource: 'Battery'})],
ota: ota.zigbeeOTA,
},
{
zigbeeModel: ['3RTHS0224Z'],
model: '3RTHS0224Z',
Expand Down
Loading