tomaae / homeassistant-mikrotik_router

Mikrotik router integration for Home Assistant
Apache License 2.0
292 stars 48 forks source link

[Bug] device_tracker wrong value #291

Closed n0way0ut closed 1 year ago

n0way0ut commented 1 year ago

Describe the issue

On HA the device_tracker is supposed to contain "home" or "not_home" value, but reading the code I see that when the device is connected to the wifi, it returns the SSID name and not the string "home" https://github.com/tomaae/homeassistant-mikrotik_router/blob/4d957aec223b8dd44de1ddc90ea113aef8d1a40b/custom_components/mikrotik_router/device_tracker.py#L139 can you fix this? and if you need the SSID name, probably it is better to export it in a proper sensor entity.

How to reproduce the issue

just check states('device_tracker.entity_name')

Expected behavior

the device_tracker should return "home" or "not_home" strings

Software versions

n0way0ut commented 1 year ago

the field is configurable, just found it, close the issue