homeassistant-mikrotik_router icon indicating copy to clipboard operation
homeassistant-mikrotik_router copied to clipboard

[Question] in attriputes port is absent attribute Rate

Open Shaderz opened this issue 1 year ago • 7 comments

hi, i have a problem in my home assistant after update microtik integration to v2.1.4

in attriputes port is apbasent attribute Rate (current rate link speed)

how me to restore a this attribute? i use this attribute in my info statistic.

Shaderz avatar Oct 02 '23 22:10 Shaderz

These? image

tomaae avatar Oct 02 '23 22:10 tomaae

These? image

no, this

image

Shaderz avatar Oct 02 '23 22:10 Shaderz

ah, it should be possible to add that one.

tomaae avatar Oct 02 '23 22:10 tomaae

ah, it should be possible to add that one.

how to do it?

Shaderz avatar Oct 20 '23 21:10 Shaderz

no, I mean addint it as additional value in next release

tomaae avatar Oct 23 '23 20:10 tomaae

no, I mean addint it as additional value in next release

Hello, is there progress in solving the problem? ) i update hacs plugin to version 2.1.4 but no attribute Rate...

Shaderz avatar May 30 '24 20:05 Shaderz

i checked soitces and find attributes to adding string with aatribute - rate

/homeassistant/custom_components/mikrotik_router/coordinator.py .................. if self.ds["interface"][uid]["type"] == "ether": if ( "sfp-shutdown-temperature" in vals and vals["sfp-shutdown-temperature"] != "" ): self.ds["interface"] = parse_api( data=self.ds["interface"], source=self.api.query( "/interface/ethernet", command="monitor", args={".id": vals[".id"], "once": True}, ), key_search="name", vals=[ {"name": "status", "default": "unknown"}, {"name": "auto-negotiation", "default": "unknown"}, {"name": "rate", "default": "unknown"}, {"name": "advertising", "default": "unknown"}, ...............

/homeassistant/custom_components/mikrotik_router/binary_sensor_types.py /homeassistant/custom_components/mikrotik_router/switch_types.py /homeassistant/custom_components/mikrotik_router/sensor_types.py

DEVICE_ATTRIBUTES_IFACE_ETHER = [ "status", "auto-negotiation", "rate", "full-duplex", "default-name", "poe-out", ]

Shaderz avatar May 30 '24 21:05 Shaderz