No way to set custom device tracking options for mikrotik hub
See original GitHub issueHome Assistant release with the issue: 0.98.4
Last working Home Assistant release (if known): 0.97.2
Component/platform: https://www.home-assistant.io/components/mikrotik/
Description of problem:
Before 0.98.0 it was possible to set consider_home
, interval_seconds
and other options from https://www.home-assistant.io/components/device_tracker/ page. After PR #25664 it’s now impossible. Even if it’s possible, I don’t see any documentation. device_tracker docs say nothing about config for separate components. mikrotik docs say nothing about these options too. Even more, they don’t describe track_devices
option, but use it in the example below 😑.
@slackr31337 can you reply?
This issue was already mentioned in https://github.com/home-assistant/home-assistant/issues/25772#issuecomment-526764264.
What I tried:
mikrotik:
- host: 192.168.0.1
username: root
password: !secret router
consider_home: 8
interval_seconds: 3
track_devices: True
Got:
home_assistant | 2019-09-08 13:40:43 ERROR (MainThread) [homeassistant.config] Invalid config for [mikrotik]: [consider_home] is an invalid option for [mikrotik]. Check: mikrotik->mikrotik->0->consider_home. (See /config/configuration.yaml, line 237). Please check the docs at https://home-assistant.io/components/mikrotik/
home_assistant | 2019-09-08 13:40:43 ERROR (MainThread) [homeassistant.setup] Setup failed for mikrotik: Invalid config.
device_tracker:
- platform: mikrotik
consider_home: 8
interval_seconds: 3
track_new_devices: False
mikrotik:
- host: 192.168.0.1
username: root
password: !secret router
track_devices: True
Got:
home_assistant | 2019-09-08 13:44:14 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
home_assistant | Traceback (most recent call last):
home_assistant | File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 65, in async_setup_legacy
home_assistant | self.platform.get_scanner, hass, {DOMAIN: self.config}
home_assistant | File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
home_assistant | result = self.fn(*self.args, **self.kwargs)
home_assistant | File "/usr/src/homeassistant/homeassistant/components/mikrotik/device_tracker.py", line 35, in get_scanner
home_assistant | return scanner if scanner.success_init else None
home_assistant | UnboundLocalError: local variable 'scanner' referenced before assignment
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:26 (17 by maintainers)
Top GitHub Comments
Any news?
I think it’s a good example of how to not make a code review 😞 . You approve something which totally breaks backward compatibility and everybody is waiting 4+ months for a fix.