Skip to content

Comments

Allow drawing files from /media folder#328

Merged
g4bri3lDev merged 1 commit intoOpenEPaperLink:mainfrom
zweckj:feature/mediaselector
Jan 31, 2026
Merged

Allow drawing files from /media folder#328
g4bri3lDev merged 1 commit intoOpenEPaperLink:mainfrom
zweckj:feature/mediaselector

Conversation

@zweckj
Copy link
Contributor

@zweckj zweckj commented Jan 31, 2026

In the currently implementation Home Assitant will always add a /config to the beginning of local paths, which effectively blocks access to the /media folder - the folder where uploaded media is usually stored.

This PR changes the base and checks if HA has access to the specified file & folder. Since the base path chages this can be a breaking change for some users.

Additionally, make sure exceptions are properly re-raised.

from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.network import get_url
from PIL import Image
from resizeimage import resizeimage
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those are just reorders from ruff

@g4bri3lDev g4bri3lDev merged commit 8ae1b47 into OpenEPaperLink:main Jan 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants