Skip to content

Commit

Permalink
feat(add): ptvo_counter_2ch (#6395)
Browse files Browse the repository at this point in the history
* add support ptvo_counter_2ch

* fix

* fix numeric

* fix num

* fix num2

* Update custom_devices_diy.ts

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
psike01 and Koenkk committed Nov 8, 2023
1 parent 7f13ad6 commit 2aee14e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/devices/custom_devices_diy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,26 @@ const definitions: Definition[] = [
await endpoint.read('genBasic', ['modelId', 'swBuildId', 'powerSource']);
},
},
{
zigbeeModel: ['ptvo_counter_2ch'],
model: 'ptvo_counter_2ch',
vendor: 'Custom devices (DiY)',
description: '2 channel counter',
fromZigbee: [fz.ignore_basic_report, fz.battery, fz.ptvo_switch_analog_input, fz.on_off],
toZigbee: [tz.ptvo_switch_trigger, tz.ptvo_switch_analog_input, tz.on_off],
exposes: [e.battery(),
e.enum('l3', ea.ALL, ['set']).withDescription('Counter value. Write zero or positive value to set a counter value. ' +
'Write a negative value to set a wakeup interval in minutes'),
e.enum('l5', ea.ALL, ['set']).withDescription('Counter value. Write zero or positive value to set a counter value. ' +
'Write a negative value to set a wakeup interval in minutes'),
e.switch().withEndpoint('l6'),
e.battery_voltage(),
],
meta: {multiEndpoint: true},
endpoint: (device) => {
return {l3: 3, l5: 5, l6: 6};
},
},
];

module.exports = definitions;

0 comments on commit 2aee14e

Please sign in to comment.