Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Relationship between command and shadowDetails #7

@billkidwell

Description

@billkidwell

In source/services/api/command/lib/command.js the shadowDetails include attributes that we do not necessarily want to change.

For the command set-temp, all three attributes will be sent, even though only the targetTemperature should be updated.

For the command set-mode, all three attributes will be sent, even though only the powerStatus should be updated.

In the case of actualTemperature, nothing should be updating that value from the console.

Is there a best practice around sending the entire state? It seems to me that the shadowDetails should be limited to the values that are meant to change, especially if they are being published in the shadow's desired attribute. If there is a good reason to send the state that the client has, then it would make more sense to me to put that state in the reported section.

As I expand this solution to numerous commands, I want to implement the correct pattern. I could offer a pull request to address these issues if it would be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions