hassio-addons / addon-grafana

Grafana - Home Assistant Community Add-ons
https://addons.community
MIT License
213 stars 61 forks source link

Add access to share for use with other add-ons #397

Closed sikaiser closed 1 month ago

sikaiser commented 2 months ago

Proposed Changes

Add acces to the directories /media and /share, as originally requested in #133. According to this post in the community forum, these folders are intended for the sharing of files between (home assistant and) addons, so I think the addon should have access to them.

All 3 of /media, /ssl and /share were designed in part to be a place shared between Home Assistant and Addons so multiple things could read and write to it and potentially communicate with each other. /share was kind of the bucket for files which didn’t fit the obvious types of the other two (media in /media, ssl-related files in /ssl, everything else in /share).

The specific use case that brought me to this: I have an SQLite database file that I want to store locally and read in Grafana. I could put it in /homeassistant_config or /ssl, but conceptually it doesn't fit there. I'd much prefer having it in /share.

Related Issues

Originally discussed in #133.

frenck commented 2 months ago

And why /media?

sikaiser commented 2 months ago

I thought to include it because it is also intended for access across addons. But I personally can not give you a concrete use case. /share solves my specific problem.

frenck commented 2 months ago

Right, but just adding it because we "can" is not something I'm a fan of. Everything we add adds more access to the add-on. Especially without a direct need or use-case for it, that is just unnecessary.

Let's remove media.

sikaiser commented 2 months ago

My suggestion to add it was because in my understanding it is intended for shared access, not because we "can". But I see your point and having access to /share alone is great too. I've updated the pull request.