Page 1 of 1
Data Format of Selector Switch has changed in build build 16046
Posted: Monday 10 June 2024 8:49
by meal
Hello
Just to inform that the Data Format of Selector Switch has changed in build build 16046 when executing
http://Domoticz_IP:Domoticz_Port/json.htm?type=command¶m=getdevices&rid=DEVICE_ID
Prior it was "Data" : "Set Level: 10 %" ==> Data = Level
Now it is "Data" : "Alive" ==> Data = Name
BR
Re: Data Format of Selector Switch has changed in build build 16046
Posted: Monday 10 June 2024 11:07
by FlyingDomotic
Nice script killer
Re: Data Format of Selector Switch has changed in build build 16046
Posted: Monday 10 June 2024 11:11
by waltervl
I checked the latest commits but could not find a reason why this would have happened. From what version did you update?
Re: Data Format of Selector Switch has changed in build build 16046
Posted: Monday 10 June 2024 12:28
by meal
Hello
From the build 16030
BR
Re: Data Format of Selector Switch has changed in build build 16046
Posted: Monday 10 June 2024 12:43
by meal
Hello
The switch has been created with type 244 (switch), subtype 62 (selector switch). switchtype 18 (Selector)
BR
Re: Data Format of Selector Switch has changed in build build 16046
Posted: Monday 10 June 2024 13:20
by waltervl
Still dont see it changed. Field Data is some kind of multipurpose field. For getting selector status level from the json I use the Level and Name fields
Re: Data Format of Selector Switch has changed in build build 16046
Posted: Monday 10 June 2024 14:12
by waltervl
Think I found it. It is there to get the level shown in the log...
https://github.com/domoticz/domoticz/pull/6077
Re: Data Format of Selector Switch has changed in build build 16046
Posted: Monday 10 June 2024 14:28
by meal
Hello
OK I see.
I will use Level instead of Data info in the JSON response.
BR
Re: Data Format of Selector Switch has changed in build build 16046
Posted: Monday 10 June 2024 18:57
by gizmocuz
Exactly, you have to use level. And for presentation the Data field.
This was requested via a PR, and I agree it made sense to show the correct data