Page 1 of 1

Negative number in custom sensor

Posted: Friday 08 December 2023 22:07
by roblom
I'm working on a dzVents script that calculates my energy costs. But I'm running into a problem with negative numbers. Is it correct that a custom sensor can't handle negative numbers?

Re: Negative number in custom sensor

Posted: Saturday 09 December 2023 0:20
by waltervl
A custom sensor can handle negative values.
Try it manually with a api call
/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=VALUE

Re: Negative number in custom sensor

Posted: Saturday 09 December 2023 10:58
by willemd
Already explained to you on github
https://github.com/domoticz/domoticz/issues/5544
Create a COUNTER device for this. They can now handle negative values.
With the edit button they can be configured. Choose CUSTOM and then defined units, label etc.

Re: Negative number in custom sensor

Posted: Saturday 09 December 2023 16:11
by roblom
Thank you. The problem was due to something else indeed.