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

Commit

Permalink
non-nz models more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveicedgreentea committed Jan 3, 2023
1 parent d123ff5 commit c755090
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions custom_components/jvc_projectors/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"config_flow": false,
"documentation": "https://www.home-assistant.io/integrations/jvc_projector",
"requirements": [
"jvc-projector-remote-improved2==3.3.0"
"jvc-projector-remote-improved2==3.4.0"
],
"ssdp": [],
"zeroconf": [],
Expand All @@ -14,5 +14,5 @@
"@iloveicedgreentea"
],
"iot_class": "local_polling",
"version": "3.3.0"
"version": "3.4.0"
}
7 changes: 4 additions & 3 deletions custom_components/jvc_projectors/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def extra_state_attributes(self):
"power_state": self._state,
"installation_mode": self._installation_mode,
"input_mode": self._input_mode,
"laser_mode": self._laser_mode,
"eshift": self._eshift,
"laser_mode": self._laser_mode if "NZ" in self._model_family else "Unsupported",
"eshift": self._eshift if "NZ" in self._model_family else "Unsupported",
"color_mode": self._color_mode,
"input_level": self._input_level,
"low_latency": self._lowlatency_enabled,
Expand Down Expand Up @@ -142,11 +142,12 @@ def update(self):
self._input_mode = self.jvc_client.get_input_mode()
self._color_mode = self.jvc_client.get_color_mode()
self._input_level = self.jvc_client.get_input_level()
self._eshift = self.jvc_client.get_eshift_mode()

# Only look at laser for NZ
if "NZ" in self._model_family:
self._laser_mode = self.jvc_client.get_laser_mode()
# Some non-nz models support this but some don't, so easier to just not check
self._eshift = self.jvc_client.get_eshift_mode()

def send_command(self, command: Iterable[str], **kwargs):
"""Send commands to a device."""
Expand Down

0 comments on commit c755090

Please sign in to comment.