diff --git a/features/devicediagnosis.go b/features/devicediagnosis.go index 37a43666..a5a911b8 100644 --- a/features/devicediagnosis.go +++ b/features/devicediagnosis.go @@ -45,8 +45,6 @@ func (d *DeviceDiagnosis) GetState() (*model.DeviceDiagnosisStateDataType, error return data, nil } -func (d *DeviceDiagnosis) SendState(operatingState *model.DeviceDiagnosisStateDataType) { +func (d *DeviceDiagnosis) SetLocalState(operatingState *model.DeviceDiagnosisStateDataType) { d.featureLocal.SetData(model.FunctionTypeDeviceDiagnosisStateData, operatingState) - - _, _ = d.featureLocal.NotifyData(model.FunctionTypeDeviceDiagnosisStateData, nil, nil, false, nil, d.featureRemote) } diff --git a/features/devicediagnosis_test.go b/features/devicediagnosis_test.go index 16f9fc2f..b7b5b97a 100644 --- a/features/devicediagnosis_test.go +++ b/features/devicediagnosis_test.go @@ -75,11 +75,11 @@ func (s *DeviceDiagnosisSuite) Test_GetState() { assert.NotNil(s.T(), result) } -func (s *DeviceDiagnosisSuite) Test_SendState() { +func (s *DeviceDiagnosisSuite) Test_SetState() { data := &model.DeviceDiagnosisStateDataType{ OperatingState: util.Ptr(model.DeviceDiagnosisOperatingStateTypeNormalOperation), PowerSupplyCondition: util.Ptr(model.PowerSupplyConditionTypeGood), } - s.deviceDiagnosis.SendState(data) + s.deviceDiagnosis.SetLocalState(data) assert.NotNil(s.T(), s.sentMessage) }