Skip to content

Add support for sensors from usermods #2093

Description

@mill1000

WLED usermods can add custom fields to the info JSON and a few of the existing usermod have "standardized" around a sensor field.

  • Internal Temperature v2
  • PIR sensor switch
  • SHT
  • Temperature

Example from the Temperature usermod:

 "sensor": {
      "temperature": [
        77,
        "F"
      ]
    },

I am working on a branch that serializes this sensor field into a dict.
i.e.

@dataclass(kw_only=True)
class Info(BaseModel):
   ...
    sensor: dict[str, Any] | None = None
    """Optional additional sensors."""

I still need to perform proper testing, but per the contribution guidelines, wanted to raise the question if this functionality would be desirable in the project.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions