homeassistant-mikrotik_router
homeassistant-mikrotik_router copied to clipboard
[Question] in attriputes port is absent attribute Rate
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.
These?
These?
no, this
ah, it should be possible to add that one.
ah, it should be possible to add that one.
how to do it?
no, I mean addint it as additional value in next release
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...
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", ]