I just started using homeassistant, and I am loving it so far. I am trying to get started with presence detection using device tracker. I have successfully connected to my iPhone using iCloud. The documentation indicates that the known_devices.yaml configuration file accepts a URL for each device to be used as the entity picture. Is it possible to use a local file instead?
I tried setting the picture value in known_devices.yaml to the absolute file path to the image with no luck. Terminal outputs the following:
I found the solution to this. Local paths can be used by referring to /local/* which points to the /www/ subdirectory inside the homeassistant configuration directory:
Thank you for pointing this out, because it doesn’t seem to be documented obviously in the places one might expect.
In my case the only directory that seems to fit your description is /usr/local/lib/python3.4/site-packages/homeassistant/components/frontend/www_static/images/ and that doesn’t seem to work.
If you don’t happen to know the answer could you suggest where to look for this?
EDIT: you can create the www directory in .homeassistant if it’s not there.
For those of you wondering how to do this in Hass.io, you can simply create the www -folder in /config/ and refer to somefile.jpg under /config/www/somefile.jpg with as /local/somefile.jpg in the YAML config file.
I recommend creating separate folders for images and other resources under www.
i have an entry that works, the picture lives in www as yours does above and my entry in customisations is :-
entity_picture: /local/acute_angle.png
have you played around with the picture ?
If so it may be your browsers cache, try clearing that out (ensure it’s for the last week or so (I got caught that way once, it only cleared the last 3 hours)
Also HA seems to put a vignetting mask over any picture so you only get a round image, would that affect what you are seeing ?
Mutt
The actual file location will not be viewable. Imagine the security implications.
So the actual file will either be hardcoded to www as an inclusion in the web server or mapped through from the python backend.
You have done everything correctly it should show.
The only thing I can think of is that your yam is off i.e. Spacing
Try multiple config customisations with different pics and see what you get, remember 2 space offsets
Mutt
Yeah … yaml is a sneaky barsteward that way, capitals not allowed anywhere, I should have spotted that but W looks very like w without context/easy comparison unlike (say) a and A
Well chalk that one up to experience
Mutt
I think the WWW vs www have to do with Linux file systems, unlike Windows, the file system considers wWw WwW www and WWW different paths, wherein Windows they would point to the same path.