Negative number in custom sensor
Moderator: leecollings
-
- Posts: 408
- Joined: Wednesday 26 February 2014 15:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: the Netherlands
- Contact:
Negative number in custom sensor
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?
- waltervl
- Posts: 5859
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Negative number in custom sensor
A custom sensor can handle negative values.
Try it manually with a api call
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=VALUE
Try it manually with a api call
/json.htm?type=command¶m=udevice&idx=IDX&nvalue=0&svalue=VALUE
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 650
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Negative number in custom sensor
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.
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.
-
- Posts: 408
- Joined: Wednesday 26 February 2014 15:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: the Netherlands
- Contact:
Re: Negative number in custom sensor
Thank you. The problem was due to something else indeed.
Who is online
Users browsing this forum: No registered users and 1 guest