<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_name(self):
 """Set the device name from _json_state, with a sensible default."""

        self._name = self._json_state.get('name')
        if not self._name:
            self._name = self.type + ' ' + self.device_id