Recently my builds failed in Travis CI, after a whole night of surveys it became clear to me that Travis is missing some files.
sensor.filesize:
- Invalid config for [sensor.filesize]: not a file @ data['file_paths'][0]. Got '/home/homeassistant/.homeassistant/home-assistant_v2.db'
not a file @ data['file_paths'][1]. Got '/home/homeassistant/.homeassistant/home-assistant.log'
not a file @ data['file_paths'][2]. Got '/home/homeassistant/.homeassistant/configuration.yaml'. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.filesize/
- platform: filesize
file_paths: [source /home/travis/build/klaasnicolaas/Smarthome-homeassistant-config/./sensors/hass_stats.yaml:16]
- /home/homeassistant/.homeassistant/home-assistant_v2.db
- /home/homeassistant/.homeassistant/home-assistant.log
- /home/homeassistant/.homeassistant/configuration.yaml
name: Filesize Database
The question now is how do I manage to ensure that Travis does not miss these files, or possibly skip them? I also have the same problem with the SSL files.
Is not the intention that my entire database will be included in the upload to github. So maybe something of a dummy content should occur?
I think this works the best, I had some dummy files made but that did not grab home assistant yet or do I have to refer to it in the travis file with a mv?
Possibly because travis doesn’t create a homeassistant user, so the file you’re moving is to travis’ home directory, but the path you’re looking for is as configured on your system.
Do you need the full file path in your sensor definition? Could it not just be the filename?
After a lot of tests I finally succeeded. I wonder if I could possibly do better the way I did now. I see that some indeed have a much shorter path link but I do not manage to get that shorter
I have now used this code: Travis_secrets: (the path links to dummy content on github)
With the Travis setup I managed to use a ./ and that works fine now
But in my secrets file I really have to enter the full path otherwise I get an error