The entities for my Linux router show data received and sent in kib/s, and I’ve been trying to create a custom sensor that converts it to mbps. Here is what I currently have, but it keeps erroring out.
Could someone please tell me what I’m doing wrong in the below template?
You have an empty filter. It should be converting to an integer. value_template: "{{ states('sensor.linux_router_kib_s_received') |int /(122) | round(1) }}"
One last tip. It is much easier on the cpu if you multiply rather than divide.
Not so you would notice though. 2 clock cycles vs 20 sort of thing. Where clock cycles are (depending on your processor speed) measured in nano to pico seconds.