hi. i’ve added the folder inside the custom_components, added the code in device_tracker. Restart homeassistant and this error come up:
Log Details (ERROR)
Thu Jul 11 2019 17:04:23 GMT+0200 (Ora legale dell’Europa centrale)
Error setting up platform legacy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 76, in async_setup_legacy
tracker.see, discovery_info)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/phonetrack/device_tracker.py", line 33, in setup_scanner
PhoneTrackDeviceTracker(hass, config, see)
File "/config/custom_components/phonetrack/device_tracker.py", line 50, in __init__
self._update_info()
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 224, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/phonetrack/device_tracker.py", line 61, in _update_info
data = data[self.token]
TypeError: list indices must be integers or slices, not str
You need the API-URL as selected with the black square. It contains all the info you need, including the TOKEN (No it is not the same token as you use for logging)
Device name is the name as selected in the bottom red square.
Hope this helps.
@hangy Could you post the (anonymized) configuration.yaml section you are using. I suspect something is wrong there.
Super, works a treat.
only issue is it is only showing me one of two devices i added.
my configuration is below, can someone here confirm this is the correct way of defining it:
I created a group within phonetrack and added both my wife’s and own phone to that group. Then used the link and token of that group. That way you can have just both devices within the same devices section of one integration.
@j1nx Thank you so much!
It works perfectly!
I’m wondering why there aren’t any official Nextcloud integrations/components.
I would imagine there’s a large overlap in Homeassistant/Nextcloud users.
@j1nx - thank you for this component! Are you still using it? I’ve installed it yesterday in my current setup and while it doesn’t throw any error, I cannot see any new entity or sensor or tracker (can I have an example of what the component should create?).
In the logs I cannot only see: 2020-11-18 12:04:08 DEBUG (SyncWorker_0) [custom_components.phonetrack.device_tracker] Updating devices None
during the first connection and then I can see a few 2020-11-18 12:09:08 DEBUG (SyncWorker_10) [custom_components.phonetrack.device_tracker] Updating devices 2020-11-18 11:09:08.860279+00:00
Which looks like it’s getting some information - but I cannot see it anywhere. Maybe it’s just that I do know what to look for?