Skip to content

Modify the water shortage abnormal timeout valve setting and its name. #7891

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

Merged
merged 3 commits into from
Aug 27, 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
11 changes: 10 additions & 1 deletion src/devices/sonoff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const sonoffExtend = {
delayedPowerOnTime: {ID: 0x0015, type: Zcl.DataType.UINT16},
externalTriggerMode: {ID: 0x0016, type: Zcl.DataType.UINT8},
detachRelayMode: {ID: 0x0017, type: Zcl.DataType.BOOLEAN},
lackWaterCloseValveTimeout: {ID: 0x5011, type: Zcl.DataType.UINT16},
},
commands: {
protocolData: {ID: 0x01, parameters: [{name: 'data', type: Zcl.BuffaloZclDataType.LIST_UINT8}]},
Expand Down Expand Up @@ -1125,6 +1126,14 @@ const definitions: Definition[] = [
description: 'The water valve is in normal state, water shortage or water leakage',
access: 'STATE_GET',
}),
binary({
name: 'auto_close_when_water_shortage',
cluster: 'customClusterEwelink',
attribute: 'lackWaterCloseValveTimeout',
description: 'Automatically shut down the water valve after the water shortage exceeds 30 minutes.',
valueOff: ['DISABLE', 0],
valueOn: ['ENABLE', 30],
}),
sonoffExtend.cyclicTimedIrrigation(),
sonoffExtend.cyclicQuantitativeIrrigation(),
],
Expand All @@ -1133,7 +1142,7 @@ const definitions: Definition[] = [
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'genOnOff']);
await reporting.bind(endpoint, coordinatorEndpoint, ['msFlowMeasurement']);
await reporting.onOff(endpoint, {min: 1, max: 1800, change: 0});
await endpoint.read('customClusterEwelink', [0x500c]);
await endpoint.read('customClusterEwelink', [0x500c, 0x5011]);
},
},
{
Expand Down
Loading