- entity: sensor.last_online
name: Last Online Sync
icon: mdi:google-drive
The path /backup is whitelisted in my config file. I also tried it with the file in my /home/homeassistant folder. I kept tweaking the permissions until I got to 777, but I still get a yellow
entity not available: sensor.last_online
syncstamp.txt is a one-line text file written out by a shell script when my online backup finishes. It contains something like
Dec 09 2018 11:00:20 AM
And that’s it. That’s what I see when I look at it with “more” or run tail -n 1 syncstamp.txt like it says in the docs.
It’s Hassbian. I’ve got a command_line sensor just above this one that works fine. It ls''s my backup directory and trims the most-recent entry for the timestamp. - trying to show most recent local backup along with most recent online sync.
The cron entry is running - the timestamp is updating, if that means anything.
I’m logged in as the “homeassistant” user and can read the file. The file is owned by homeassistant:homeassistant.
Like I said - it seems to simple to fail, yet it’s failing.
I even went as far as trying to make a second command_line sensor that just called more syncstamp.txt, but the log filled with “duplicate key” errors. That’s a separate problem, though…
Did you restart Home Assistant after creating the file sensor?
Does it show up in your state overview? (https://[your-ha-url]/dev-state or the < > icon at the bottom left)
Yeah I am trying to figure this one out as well. I am trying to read the output from my Acurite weather station. It creates the sensor but for instance it only ever reads 0°F. I dont see anything in the logs indicating that it even tries to read the file.
Multiple HA restart and Host restarts. I am running using the Official HASS.io Hyper-V image. As I have had issues with Raspberry and it nuking SDCards.