denonavr 1.0.1__py3-none-any.whl → 1.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
denonavr/__init__.py CHANGED
@@ -17,7 +17,7 @@ from .ssdp import async_identify_denonavr_receivers
17
17
  logging.getLogger(__name__).addHandler(logging.NullHandler())
18
18
 
19
19
  __title__ = "denonavr"
20
- __version__ = "1.0.1"
20
+ __version__ = "1.1.1"
21
21
 
22
22
 
23
23
  async def async_discover():
denonavr/api.py CHANGED
@@ -563,10 +563,55 @@ class DenonAVRTelnetApi:
563
563
  "PSBAS ?",
564
564
  "PSTRE ?",
565
565
  "PSDYNEQ ?",
566
+ "PSLFC ?",
567
+ "PSCNTAMT ?",
566
568
  "PSMULTEQ: ?",
567
569
  "PSREFLEV ?",
568
570
  "PSDYNVOL ?",
569
571
  "MS?",
572
+ "MNMEN?",
573
+ "DIM ?",
574
+ "PSDELAY?",
575
+ "ECO?",
576
+ "VSMONI ?",
577
+ "PSDIRAC ?",
578
+ "CV?",
579
+ "PSNEURAL ?",
580
+ "PSIMAX ?",
581
+ "PSIMAXAUD ?",
582
+ "PSIMAXHPF ?",
583
+ "PSIMAXLPF ?",
584
+ "PSIMAXSWM ?",
585
+ "PSIMAXSWO ?",
586
+ "PSSWR ?",
587
+ "PSSWL ?",
588
+ "SSTTR ?",
589
+ "MSQUICK ?",
590
+ "STBY?",
591
+ "SLP?",
592
+ "VSAUDIO ?",
593
+ "PSCES ?",
594
+ "VSVPM ?",
595
+ "PSLFE ?",
596
+ "PSLOM ?",
597
+ "PSBSC ?",
598
+ "PSDEH ?",
599
+ "PSCINEMA EQ. ?",
600
+ "PSAUROPR ?",
601
+ "PSAUROST ?",
602
+ "PSAUROMODE ?",
603
+ "PSRSZ ?",
604
+ "TR?",
605
+ "SPPR ?",
606
+ "BTTX ?",
607
+ "PSDIC ?",
608
+ "PSSPV ?",
609
+ "PSSP: ?",
610
+ "PSDRC ?",
611
+ "PSDEL ?",
612
+ "PSRSTR ?",
613
+ "PSGEQ ?",
614
+ "PSHEQ ?",
570
615
  skip_confirmation=True,
571
616
  )
572
617
 
denonavr/audyssey.py CHANGED
@@ -60,6 +60,12 @@ class DenonAVRAudyssey(DenonAVRFoundation):
60
60
  _multeq_control: Optional[bool] = attr.ib(
61
61
  converter=attr.converters.optional(convert_string_int_bool), default=None
62
62
  )
63
+ _lfc: Optional[bool] = attr.ib(
64
+ converter=attr.converters.optional(convert_string_int_bool), default=None
65
+ )
66
+ _containment_amount: Optional[int] = attr.ib(
67
+ converter=attr.converters.optional(int), default=None
68
+ )
63
69
 
64
70
  # Update tags for attributes
65
71
  # AppCommand0300.xml interface
@@ -94,6 +100,12 @@ class DenonAVRAudyssey(DenonAVRFoundation):
94
100
  self._dynamiceq = "1"
95
101
  elif parameter == "DYNEQ OFF":
96
102
  self._dynamiceq = "0"
103
+ elif parameter == "LFC ON":
104
+ self._lfc = "1"
105
+ elif parameter == "LFC OFF":
106
+ self._lfc = "0"
107
+ elif parameter[:6] == "CNTAMT":
108
+ self._containment_amount = int(parameter[7:])
97
109
 
98
110
  async def async_update(
99
111
  self, global_update: bool = False, cache_id: Optional[Hashable] = None
@@ -186,6 +198,24 @@ class DenonAVRAudyssey(DenonAVRFoundation):
186
198
  return list(MULTI_EQ_MAP_LABELS_TELNET.keys())
187
199
  return list(MULTI_EQ_MAP_LABELS_APPCOMMAND.keys())
188
200
 
201
+ @property
202
+ def lfc(self) -> Optional[bool]:
203
+ """
204
+ Return value of LFC.
205
+
206
+ Only available if using Telnet.
207
+ """
208
+ return self._lfc
209
+
210
+ @property
211
+ def containment_amount(self) -> Optional[int]:
212
+ """
213
+ Return value of Containment Amount.
214
+
215
+ Only available if using Telnet.
216
+ """
217
+ return self._containment_amount
218
+
189
219
  ##########
190
220
  # Setter #
191
221
  ##########
@@ -284,6 +314,81 @@ class DenonAVRAudyssey(DenonAVRFoundation):
284
314
  else:
285
315
  await self.async_dynamiceq_on()
286
316
 
317
+ async def async_lfc_on(self):
318
+ """Turn LFC on."""
319
+ if self._device.telnet_available:
320
+ await self._device.telnet_api.async_send_commands(
321
+ self._device.telnet_commands.command_lfc.format(mode="ON")
322
+ )
323
+ return
324
+ await self._device.api.async_get_command(
325
+ self._device.urls.command_lfc.format(mode="ON")
326
+ )
327
+
328
+ async def async_lfc_off(self):
329
+ """Turn LFC off."""
330
+ if self._device.telnet_available:
331
+ await self._device.telnet_api.async_send_commands(
332
+ self._device.telnet_commands.command_lfc.format(mode="OFF")
333
+ )
334
+ return
335
+ await self._device.api.async_get_command(
336
+ self._device.urls.command_lfc.format(mode="OFF")
337
+ )
338
+
339
+ async def async_toggle_lfc(self):
340
+ """Toggle LFC."""
341
+ if self._lfc:
342
+ await self.async_lfc_off()
343
+ else:
344
+ await self.async_lfc_on()
345
+
346
+ async def async_containment_amount(self, amount: int) -> None:
347
+ """
348
+ Set Containment Amount.
349
+
350
+ Valid values are 1-7.
351
+ """
352
+ if amount < 1 or amount > 7:
353
+ raise AvrCommandError("Containment amount must be between 1 and 7")
354
+ local_amount = f"{amount:02}"
355
+ if self._device.telnet_available:
356
+ await self._device.telnet_api.async_send_commands(
357
+ self._device.telnet_commands.command_containment_amount.format(
358
+ value=local_amount
359
+ )
360
+ )
361
+ return
362
+ await self._device.api.async_get_command(
363
+ self._device.urls.command_containment_amount.format(value=local_amount)
364
+ )
365
+
366
+ async def async_containment_amount_up(self) -> None:
367
+ """Increase Containment Amount."""
368
+ if self._device.telnet_available:
369
+ await self._device.telnet_api.async_send_commands(
370
+ self._device.telnet_commands.command_containment_amount.format(
371
+ value="UP"
372
+ )
373
+ )
374
+ return
375
+ await self._device.api.async_get_command(
376
+ self._device.urls.command_containment_amount.format(value="UP")
377
+ )
378
+
379
+ async def async_containment_amount_down(self) -> None:
380
+ """Decrease Containment Amount."""
381
+ if self._device.telnet_available:
382
+ await self._device.telnet_api.async_send_commands(
383
+ self._device.telnet_commands.command_containment_amount.format(
384
+ value="DOWN"
385
+ )
386
+ )
387
+ return
388
+ await self._device.api.async_get_command(
389
+ self._device.urls.command_containment_amount.format(value="DOWN")
390
+ )
391
+
287
392
 
288
393
  def audyssey_factory(instance: DenonAVRFoundation) -> DenonAVRAudyssey:
289
394
  """Create DenonAVRAudyssey at receiver instances."""