radsonpatrick / qbittorrent_custom_component

Custom component for use in Homeasssistant
6 stars 3 forks source link

Incorrect speed limit #4

Open NightMean opened 7 months ago

NightMean commented 7 months ago

Hi, I've just setup your component along with the speed limit however you mention that the speed is in Mb/s although my qbittorent shows kbit/s. This, for me causes weird behaviour where the number is incorrectly represented in qBittorent and the download speeds starts to go into unreasonable numbers. The max that qbittorent allows by using their slider is 10000 KiB/s. Of course, you can put higher number manually. I have set it to the max in qbittorent which got picked up by your component but then some calculation happened and the value got changed to 1,000.0 in Home assistant whears in qbittorent, it got changed to 1000000 KiB/s

image

I'm not sure what is going on as home assistant started changing the value by it's own to some random numbers. image

I think, this might be caused by my older version of qBittorent as I use qBittorent version: 4.3.9 due to the fact that higher versions had some issues which I'm currently not sure if they had been resolved yet. I have not tried upgrading qBittorent yet. All other features work as expected. If it's really this case, you should make a note that it requires certain qBittorent version in order for it to work.

I'm using your example config:

number:
  - platform: custom_qbittorrent 
    name: qbit_limit_speed #optional
    host: !secret qbittorent_url
    username: !secret qbittorent_username
    password: !secret qbittorent_pass
    min: 0
    max: 120  #value in Mb/s
    step: 0.5

Edit: This same behaviour applies when alternate speed switch is used. The download speed value is set to 90000 KiB/s instead of 9000 Kib/s that I had previously

radsonpatrick commented 5 months ago

hello... i working to resolve this problem !