How to use updateQuiet
Posted: Saturday 19 October 2024 11:25
I have a device of type 'switch' defined that I want to use to control the preconditioning of my EV.
Triggering the device submits an API call to the car to switch the preconditioning on or off.
At the same time I have a script that collects the actual status of the car (including precontitioning) that updates about 10 devices (e.g. mileage, SoC).
Because the preconditioning can also be set from the carÅ› mobile app, I want to update the state of my preconditioning device in Domoticz to be updated (to sync the status of my Domoticz device and the actualk car status in case of a difference), while avoiding (jin this particular case) that it submits the API call to the car.
From https://www.domoticz.com/wiki/DzVents:_ ... object_API " the "updateQuiet" function should be applicable. I think I could use something like:
But when I try this, I get an error "attempt to call a nil value (field 'updateQuiet')"
As "updateQuiet" should be a function to the device this error message puzzles me even more.
Triggering the device submits an API call to the car to switch the preconditioning on or off.
At the same time I have a script that collects the actual status of the car (including precontitioning) that updates about 10 devices (e.g. mileage, SoC).
Because the preconditioning can also be set from the carÅ› mobile app, I want to update the state of my preconditioning device in Domoticz to be updated (to sync the status of my Domoticz device and the actualk car status in case of a difference), while avoiding (jin this particular case) that it submits the API call to the car.
From https://www.domoticz.com/wiki/DzVents:_ ... object_API " the "updateQuiet" function should be applicable. I think I could use something like:
Code: Select all
if (carPreconditioning) then
domoticz.devices(idxPreconditionng).updateQuiet('On')
else
domoticz.devices(idxPreconditionng).updateQuiet('Off')
end
As "updateQuiet" should be a function to the device this error message puzzles me even more.