Skip to content

Filters are kinda cumulative, kinda not #560

@FrnchFrgg

Description

@FrnchFrgg

According to the documentation, the following code should only have resample: 3m applied to sun.sun, but the second filter actually gets applied.

type: custom:plotly-graph
defaults:
  entity:
    filters:
      - resample: 1m
      - map_y: "0"
entities:
  - entity: sun.sun
    filters:
      - resample: 3m
hours_to_show: 24
refresh_interval: 10

From my testing, it seems that per-entity filters overwrite default filters, but only on an item-by-item basis: the first filter is overwritten by the first filter, the second by the second, and so on. Any remaining filters will stay there. This is probably a side-effect of the ... merging that merges the arrays instead of squarely replacing the old by the new.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions