read SValues content and put in a local variable
Posted: Sunday 22 October 2017 22:09
Hello, i want to implement a monitoring script for check the state of my xiaomi vacuum.
I've installed the plugin and it works, in the device 'VACUUM' the SValues is CLEANING-CHARGING-PAUSED and i want to insert this value in a local variable and compare the state later such:
FIRST:
local STATE == domoticz.devices('VACUUM').Svalues
LATER:
if domoticz.devices('VACUUM').Svalues =~ STATE then
domoticz.notify........
any help how to get the Svalues? I know how to read the .state (that is ON when cleaning but OFF when both is in pause or charging so it's not usefull)...
Thanks in advance, cheers
I've installed the plugin and it works, in the device 'VACUUM' the SValues is CLEANING-CHARGING-PAUSED and i want to insert this value in a local variable and compare the state later such:
FIRST:
local STATE == domoticz.devices('VACUUM').Svalues
LATER:
if domoticz.devices('VACUUM').Svalues =~ STATE then
domoticz.notify........
any help how to get the Svalues? I know how to read the .state (that is ON when cleaning but OFF when both is in pause or charging so it's not usefull)...
Thanks in advance, cheers