How to use the denonavr.denonavr.DenonAVR function in denonavr

To help you get started, we’ve selected a few denonavr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scarface-4711 / denonavr / denonavr / __init__.py View on Github external
def init_all_receivers():
    """
    Initialize all discovered Denon AVR receivers in LAN zone.

    Returns a list of created Denon AVR instances.
    By default SSDP broadcasts are sent up to 3 times with a 2 seconds timeout.
    """
    receivers = discover()

    init_receivers = []
    for receiver in receivers:
        init_receiver = DenonAVR(receiver["host"])
        init_receivers.append(init_receiver)
    return init_receivers
github scarface-4711 / denonavr / denonavr / denonavr.py View on Github external
self._mute = STATE_ON
                    return True
                else:
                    return False
            else:
                if self.send_get_command(self._urls.command_mute_off):
                    self._mute = STATE_OFF
                    return True
                else:
                    return False
        except requests.exceptions.RequestException:
            _LOGGER.error("Connection error: mute command not sent.")
            return False


class DenonAVRZones(DenonAVR):
    """Representing an additional zone of a Denon AVR Device."""

    def __init__(self, parent_avr, zone, name):
        """
        Initialize additional zones of DenonAVR.

        :param parent_avr: Instance of parent DenonAVR.
        :type parent_avr: denonavr.DenonAVR

        :param zone: Zone name of this instance
        :type zone: str

        :param name: Device name, if None FriendlyName of device is used.
        :type name: str
        """
        self._parent_avr = parent_avr

denonavr

Automation Library for Denon AVR receivers

MIT
Latest version published 27 days ago

Package Health Score

72 / 100
Full package analysis

Similar packages