From 59dece551ecbc19f6e241ab3ddf38ffceafd5e76 Mon Sep 17 00:00:00 2001 From: Ilya Kirov Date: Fri, 30 Aug 2024 21:09:30 +0300 Subject: [PATCH] fix: Changed enum to numeric expose for counters in 'ptvo_counter_2ch' device (#7919) * Changed enum to numeric expose for counters in 'ptvo_counter_2ch' device. * fix --- src/devices/custom_devices_diy.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/devices/custom_devices_diy.ts b/src/devices/custom_devices_diy.ts index fb833ba6ec29e..b468c1129b841 100644 --- a/src/devices/custom_devices_diy.ts +++ b/src/devices/custom_devices_diy.ts @@ -1124,15 +1124,19 @@ const definitions: Definition[] = [ exposes: [ e.battery(), e - .enum('l3', ea.ALL, ['set']) + .numeric('l3', ea.ALL) + .withValueMin(-999999999) + .withValueMax(999999999) .withDescription( - 'Counter value. Write zero or positive value to set a counter value. ' + + 'Counter 1 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']) + .numeric('l5', ea.ALL) + .withValueMin(-999999999) + .withValueMax(999999999) .withDescription( - 'Counter value. Write zero or positive value to set a counter value. ' + + 'Counter 2 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'),