Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
blocking get_chromecast for call & fix FR translation
Browse files Browse the repository at this point in the history
  • Loading branch information
maykar committed Jul 6, 2020
1 parent d7aa20d commit 9b04796
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
7 changes: 2 additions & 5 deletions custom_components/plex_assistant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class PA:
alias_names = []
attr_update = True
running = False
sensor_updating = False


def setup(hass, config):
Expand Down Expand Up @@ -93,10 +92,8 @@ def handle_input(call):
return

PA.running = True

if not PA.sensor_updating:
PA.attr_update = True
get_chromecasts(blocking=False, callback=cc_callback)
PA.attr_update = True
get_chromecasts(blocking=True, callback=cc_callback)

cast = None
client = False
Expand Down
5 changes: 1 addition & 4 deletions custom_components/plex_assistant/localize.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,7 @@
"série"
],
"controls": {
"play": [
"joue",
"lis"
],
"play": "joue",
"pause": "pause",
"stop": "arrête",
"jump_forward": [
Expand Down
2 changes: 0 additions & 2 deletions custom_components/plex_assistant/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def device_state_attributes(self):
return self._attributes

async def async_update(self):
PA.sensor_updating = True
if not PA.running:
PA.attr_update = True
get_chromecasts(blocking=False, callback=cc_callback)
Expand All @@ -56,4 +55,3 @@ async def async_update(self):
'Cast Devices': devicelist or 'None',
'Plex Clients': clients or 'None'
}}
PA.sensor_updating = False

0 comments on commit 9b04796

Please sign in to comment.