Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: attribute loss when updating entity #1667

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GuillaumeOd
Copy link

related to #1660

Copy link
Member

@AlvaroVega AlvaroVega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a commented here #1660 (comment) a test case about his issue is needed.

@fgalan
Copy link
Member

fgalan commented Nov 6, 2024

@GuillaumeOd please have a look to documentation in the case it has to change to describe the new behaviour with this PR.

@AlvaroVega
Copy link
Member

This PR is reverting this commit: 166f771

@GuillaumeOdile GuillaumeOdile force-pushed the fix/attribute-loss-when-updating-a-device branch from 6c34980 to d9e6fdf Compare November 14, 2024 15:15
@fgalan
Copy link
Member

fgalan commented Nov 22, 2024

@GuillaumeOd not sure if I'm getting the point...

You want to send measures like this:

{
  "fireDetectionThreshold": 10
}

and get corresponding attribute at CB this way:

                    "fireDetectionThreshold": {
                        type: "Number",
                        value: 10
                    }

is my interpretation correct?

@AlvaroVega AlvaroVega self-requested a review November 22, 2024 13:41
@GuillaumeOd
Copy link
Author

GuillaumeOd commented Nov 22, 2024

@fgalan Yes, exactly! Regarding the type, I'm not entirely sure if it should be Number or Text, but your interpretation seems spot on.

Could you try running the test locally without my fix to confirm it fails as expected?

@fgalan
Copy link
Member

fgalan commented Nov 22, 2024

@fgalan Yes, exactly! Regarding the type, I'm not entirely sure if it should be Number or Text, but your interpretation seems spot on.

In that case, why don't use at provisioning time

                            {
                                name: 'fireDetectionThreshold',
                                type: 'Number'
                            }

instead of

                            {
                                object_id: 'f_dt',
                                name: 'fireDetectionThreshold',
                                type: 'Number'
                            }

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants