Wizzard72 / Domoticz-Alarm

This plugin for Domoticz creates an Alarm System
GNU General Public License v3.0
7 stars 1 forks source link

Issues with selected seconds #17

Open nachonam opened 2 years ago

nachonam commented 2 years ago

Hello, Thanks for your great job...

In your code, when you use Devices[self.ALARM_ENTRY_DELAY].nValue in trimmer switchs, you get the id of level not the value. For exemple, with "LevelNames": "0 second|30 seconds|40 seconds|50 seconds|60 seconds|70 seconds|80 seconds|90 seconds", you will create the array 0 0 second 10 30 seconds 20 40 seconds ../.. if you select 30 seconds, you will get the id (10), so the entry delay will be 10 seconds (not 30 seconds as show in label)

A workaround will be put in label the id of entries: "LevelNames": "0 second|10 seconds|20 seconds|30 seconds|40 seconds|50 seconds|60 seconds|70 seconds",

A more complex solution will be get the LavelNames from Options and parse it to get the entry with select id

Wizzard72 commented 2 years ago

I have updated the plugin.