Skip to content

Commit

Permalink
Add matte color option to art.py and update config.yaml for enhanced …
Browse files Browse the repository at this point in the history
…customization
  • Loading branch information
gijsvdhoven committed Nov 29, 2024
1 parent a929706 commit e69c40c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion homeassistant-samsung-frame-art-beta/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ def parseargs():
parser.add_argument('--ip', action="store", type=str, default=None, help='ip address of TV (default: %(default)s))')
parser.add_argument('--filter', action="store", type=str, default="none", help='photo filter to apply (default: %(default)s))')
parser.add_argument('--matte', action="store", type=str, default="none", help='matte to apply (default: %(default)s))')
parser.add_argument('--matte-color', action="store", type=str, default="black", help='matte color to apply (default: %(default)s))')
return parser.parse_args()




# Set the path to the folder containing the images
folder_path = '/media/frame'

# Set the matte and matte color
matte_with_color = f"{args.matte}_{args.matte_color}" if args.matte != 'none' else args.matte

async def main():
args = parseargs()
Expand Down Expand Up @@ -84,7 +88,7 @@ async def main():
with open(filename, "rb") as f:
file_data = f.read()
file_type = os.path.splitext(filename)[1][1:]
content_id = await tv.upload(file_data, file_type=file_type, matte=args.matte)
content_id = await tv.upload(file_data, file_type=file_type, matte=matte_with_color)
logging.info('uploaded {} to tv as {}'.format(filename, content_id))
await tv.set_photo_filter(content_id, args.filter)

Expand Down
4 changes: 2 additions & 2 deletions homeassistant-samsung-frame-art-beta/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ options:
schema:
tv: "str?"
photo_filter: list(None|Aqua|ArtDeco|Ink|Wash|Pastel|Feuve)?
matte: List(none|myshelf|modernthin|modern|modernwide|flexible|shadowbox|panoramic|triptych|mix|squares)?
matte_color: List(black|neutral|antique|warm|polar|sand|seafoam|sage|burgandy|navy|apricot|byzantine|lavender|redorange|skyblue|turquoise)?
matte: list(none|myshelf|modernthin|modern|modernwide|flexible|shadowbox|panoramic|triptych|mix|squares)?
matte_color: list(black|neutral|antique|warm|polar|sand|seafoam|sage|burgandy|navy|apricot|byzantine|lavender|redorange|skyblue|turquoise)?
image: gijsvdhoven/{arch}-addon-homeassistant-samsung-frame-art-beta
Binary file removed homeassistant-samsung-frame-art-beta/frame/test2.jpg
Binary file not shown.

0 comments on commit e69c40c

Please sign in to comment.