langcode: en
status: true
dependencies:
  enforced:
    module:
      - farm_migrate
      - data_stream
      - farm_sensor
      - farm_sensor_listener
id: farm_migrate_sensor_listener_data_streams
label: 'Listener sensor data streams'
migration_group: farm_migrate_sensor_data
migration_tags:
  - 'Drupal 7'
  - 'farmOS 1.x'
class: Drupal\migrate\Plugin\Migration
field_plugin_method: null
cck_plugin_method: null
source:
  plugin: d7_sensor_listener_data_names
destination:
  plugin: data_stream
process:
  # Hard-code the data stream bundle.
  type:
    plugin: default_value
    default_value: basic
  # Use the old sensor ID to find the migrated sensor ID.
  providing_asset:
    - plugin: farm_migration_group_lookup
      migration_group: farm_migrate_asset
      source: id
      no_stub: true
    - plugin: skip_on_empty
      method: row
  # Build a name for the data stream.
  name:
    plugin: get
    source: name
migration_dependencies:
  required:
    - farm_migrate_asset_sensor_listener
  optional: {  }
