ioBroker / ioBroker.ping

Pings configured IPs for ioBroker
MIT License
21 stars 17 forks source link

State value to set for "x" has to be type "number" but recevied type "string" #36

Closed simonssoftware closed 3 years ago

simonssoftware commented 3 years ago

Describe the bug
image

image

To Reproduce
Steps to reproduce the behavior:

  1. Add a device which is not reachable
  2. Turn on extended information

Expected behavior
Do not set value '-' when device is not reachable.

Versions:

Baenker commented 3 years ago

Wenn ich es richtig sehe muss die Zeile 105 der main.js angepasst werden:

adapter.setState(task.stateTime, {val: result.ms === null ? '-' : result.ms / 1000, ack: true});

ich würde vermuten besser wäre:

adapter.setState(task.stateTime, {val: result.ms === null ? 0 : result.ms / 1000, ack: true});

Apollon77 commented 3 years ago

then "null" is the better value (so not as string but null). Adapter is only list will come to it soon :-)

Apollon77 commented 3 years ago

fixed in next version