Skip to content
This repository has been archived by the owner on Aug 24, 2024. It is now read-only.

Commit

Permalink
only get hdr data when in hdr
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveicedgreentea committed Jan 31, 2023
1 parent 21d6f72 commit 37c9a8e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion custom_components/jvc_projectors/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def update(self):
# only check HDR if the content type matches else timeout
if any(x in self._content_type for x in ["hdr", "hlg"]):
self._hdr_processing = self.jvc_client.get_hdr_processing()
self._hdr_data = self.jvc_client.get_hdr_data()
self._theater_optimizer = (
self.jvc_client.get_theater_optimizer_state()
)
Expand All @@ -219,7 +220,15 @@ def update(self):
# nx and nz have these things, others may not
if any(x in self._model_family for x in ["NX", "NZ"]):
self._eshift = self.jvc_client.get_eshift_mode()
self._hdr_data = self.jvc_client.get_hdr_data()

# NX and NZ process things diff
if "NX" in self._model_family:
self._eshift = self.jvc_client.get_eshift_mode()
# TODO: find better way
try:
self._hdr_data = self.jvc_client.get_hdr_data()
except TypeError:
pass

self._is_updating = False
def send_command(self, command: Iterable[str], **kwargs):
Expand Down

0 comments on commit 37c9a8e

Please sign in to comment.