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

Fix issue with polling #3

Merged
merged 1 commit into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 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-improved>=1.2.5"
"jvc-projector-remote-improved>=1.2.6"
],
"ssdp": [],
"zeroconf": [],
Expand Down
11 changes: 1 addition & 10 deletions custom_components/jvc_projectors/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(

@property
def should_poll(self):
return True
return False

@property
def name(self):
Expand Down Expand Up @@ -149,8 +149,6 @@ async def async_turn_on(self, **kwargs):
_, success = await self.jvc_client.async_power_on()
if success:
self._state = True
else:
self._state = None

async def async_turn_off(self, **kwargs):
"""Send the power off command."""
Expand All @@ -163,8 +161,6 @@ async def async_turn_off(self, **kwargs):
_, success = await self.jvc_client.async_power_off()
if success:
self._state = False
else:
self._state = None

async def _async_collect_updates(self):
"""
Expand Down Expand Up @@ -215,11 +211,6 @@ async def async_send_command(self, command: list[str], **kwargs):

async with self._lock:
_, success = await self.jvc_client.async_exec_command(command)
if success:
if "power" in command and "on" in command:
self._state = True
if "power" in command and "off" in command:
self._state = False

async def service_async_info(self) -> None:
"""
Expand Down