def state(self) -> str:
        """Return the current state of the device (if it exists)."""
        return self._coerce_state_from_string(
            next(
                attr['Value'] for attr in self._device_json.get(
                    'Attributes', [])
                if attr.get('AttributeDisplayName') == 'doorstate'))