<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _update_state(self, value: str) -> None: """Update state temporary during open or close."""

        attribute = next(attr for attr in self._device['device_info'].get(
            'Attributes', []) if attr.get(
                'AttributeDisplayName') == 'doorstate')
        if attribute is not None:
            attribute['Value'] = value