Skip to content

Battery Storage device has invalid Power Source feature configuration #1775

@tomasmcguinness

Description

@tomasmcguinness

When I add a battery_storage endpoint to my node, the code crashes with an exception.

esp_matter_cluster: Exactly one of the feature(s) must be supported from (PowerSource,Battery)

When I look closer at the code, I can see that the battery_storage::add function sets both Wired and Battery features on it's power_source cluster

 config->power_source_device.power_source.feature_flags = power_source::feature::battery::get_id() | power_source::feature::wired::get_id();

This causes the following validation call to throw the error.

VALIDATE_FEATURES_EXACT_ONE("PowerSource,Battery", feature::wired::get_id(), feature::battery::get_id());

This is mirrored by the specification, which states that only Wired or Battery feature flags can be set.

Image

Environment

  • esp-matter via component, v 1.4.2
  • esp-idf 5.5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions