Skip to content

Commit

Permalink
Fix first token scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
xchwarze committed Oct 21, 2019
1 parent 3beea52 commit e557cae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion custom_components/samsungtv_custom/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,14 @@ def __init__(self, host, port, name, timeout, mac, uuid, update_method, update_c
# sending the next command to avoid turning the TV back ON).
self._end_of_power_off = None

token_file = os.path.dirname(os.path.realpath(__file__)) + '/token-' + host + '.txt'
token_file = None
if port == 8002:
token_file = os.path.dirname(os.path.realpath(__file__)) + '/token-' + host + '.txt'

# For correct set of auth token
if os.path.isfile(token_file) is False:
timeout = 30

self._remote = SamsungTVWS(
name=name,
host=host,
Expand Down

0 comments on commit e557cae

Please sign in to comment.