tomaae/homeassistant-mikrotik_router

Show unit conversion example

tangentsoft opened this issue · 5 comments

The port Rx/Tx rates are coming in as MByte/sec, but I want them in Mbit/sec units. I see from a closed feature request that this custom component no longer does the unit conversion, but it would still be useful if you'd show an example of how to configure this.

I tried opening one of my dashboard components' sensor card configuration editors and putting this in:

graph: line
type: sensor
entity: sensor.mikrotik_ether5_rx
detail: 2
name: Internet Rx Total
unit: Mbps
native_unit_of_measurement: MB/s
unit_of_measurement: Mbit/s

The unit names are correct, but it didn't change the output. I still get values in the 44000 range for my 350 Mbit/sec connection when doing a speed test.

yes, there was a change in HA on how they do conversions.
I have it already working in other integration and it will be ported to this one after I'm done with all rewrites.

Isn't this already possible with the entity settings? (or am I misunderstanding the question?)
image

@mvdwetering Yes, that actually does affect things! Thank you.

Now I want a way to do all sixteen entities on my ax³ at once, so I don't have to do them all one by one through the GUI. (Five copper, two hardware WiFi radios, one slave WiFi; times two for Rx and Tx.)

I went looking for a YAML editor or similar to copy-paste the one change into all the others with a regex, but that's what you get when you point an old Vim hand at a web app. :)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This issue was closed because it has been stalled for 5 days with no activity.