Skip to content

Commit

Permalink
fix: Set proper transform flag for Set command (#1578)
Browse files Browse the repository at this point in the history
close #1553

Signed-off-by: Cloud Tsai <cloudxxx8@gmail.com>
  • Loading branch information
cloudxxx8 authored May 16, 2024
1 parent decf7a4 commit 97b36af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/application/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func writeDeviceResource(device models.Device, resourceName string, attributes s

// Updated resource value will be published to MessageBus as long as it's not write-only
if dr.Properties.ReadWrite != common.ReadWrite_W {
return transformer.CommandValuesToEventDTO([]*sdkModels.CommandValue{cv}, device.Name, resourceName, false, dic)
return transformer.CommandValuesToEventDTO([]*sdkModels.CommandValue{cv}, device.Name, resourceName, configuration.Device.DataTransform, dic)
}

return nil, nil
Expand Down Expand Up @@ -423,7 +423,7 @@ func writeDeviceCommand(device models.Device, commandName string, attributes str

// Updated resource(s) value will be published to MessageBus as long as they're not write-only
if dc.ReadWrite != common.ReadWrite_W {
return transformer.CommandValuesToEventDTO(cvs, device.Name, commandName, false, dic)
return transformer.CommandValuesToEventDTO(cvs, device.Name, commandName, configuration.Device.DataTransform, dic)
}

return nil, nil
Expand Down

0 comments on commit 97b36af

Please sign in to comment.