langcode: en
status: true
dependencies:
  enforced:
    module:
      - farm_migrate
      - farm_sensor
      - farm_sensor_listener
id: farm_migrate_asset_sensor_listener
label: 'Assets (Listener sensors)'
migration_group: farm_migrate_asset
migration_tags:
  - 'Drupal 7'
  - 'farmOS 1.x'
class: Drupal\migrate\Plugin\Migration
field_plugin_method: null
cck_plugin_method: null
source:
  plugin: d7_sensor_asset
  sensor_type: 'listener'
destination:
  plugin: 'entity:asset'
process:
  # Hard-code the bundle.
  type:
    plugin: default_value
    default_value: sensor
  # Maintain the asset ID.
  id:
    plugin: get
    source: id
  # Extract the private_key from sensor settings.
  private_key:
    plugin: extract
    source: sensor_settings
    default: ''
    index:
      - private_key
  # Extract the public_key from sensor settings.
  public_key:
    plugin: extract
    source: sensor_settings
    default: ''
    index:
      - public_key
migration_dependencies:
  required: {  }
  optional: {  }
