'Ask the ZigBee device what state its input pin is in.'

def update(self):

    try:
        sample = DEVICE.get_sample(self._config.address)
    except ZIGBEE_TX_FAILURE:
        _LOGGER.warning('Transmission    failure    when    attempting    to    get    sample    from    ZigBee    device    at    address:    %s', hexlify(self._config.address))
        return
    except ZIGBEE_EXCEPTION as exc:
        _LOGGER.exception('Unable    to    get    sample    from    ZigBee    device:    %s', exc)
        return
    pin_name = DIGITAL_PINS[self._config.pin]
    if (pin_name not in sample):
        _LOGGER.warning('Pin    %s    (%s)    was    not    in    the    sample    provided    by    ZigBee    device    %s.', self._config.pin, pin_name, hexlify(self._config.address))
        return
    self._state = self._config.state2bool[sample[pin_name]]
