Skip to content

Commit

Permalink
Refactor main function in art.py to improve argument parsing for matt…
Browse files Browse the repository at this point in the history
…e and matte color
  • Loading branch information
gijsvdhoven committed Nov 29, 2024
1 parent b08c925 commit 48c0f1e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions homeassistant-samsung-frame-art-beta/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,23 @@ def parseargs():
# Set the path to the folder containing the images
folder_path = '/media/frame'

matte = args.matte
matte_color = args.matte_color

# Set the matte and matte color
async def main():
args = parseargs()

if matte != 'none':
matte_var = f"{matte}_{matte_color}"
else:
matte_var = matte

matte = args.matte
matte_color = args.matte_color

# Set the matte and matte color

if matte != 'none':
matte_var = f"{matte}_{matte_color}"
else:
matte_var = matte



async def main():
args = parseargs()
tv = SamsungTVAsyncArt(host=args.ip, port=8002)
await tv.start_listening()

Expand Down

0 comments on commit 48c0f1e

Please sign in to comment.