Skip to content

Can't save 2 persistences (blockly) #5245

@SnouF

Description

@SnouF

Steps to Reproduce

Write blockly

Image
var timeSeries = new items.TimeSeries('REPLACE');
[[time.ZonedDateTime.now().plusHours(1), '1'], [time.ZonedDateTime.now().plusHours(2), '2'], [time.ZonedDateTime.now().plusHours(3), '3']].forEach(s => timeSeries.add(s[0], s[1]));
items.getItem('testPersist0').persistence.persist(timeSeries, 'inmemory');
var timeSeries2 = new items.TimeSeries('REPLACE');
[[time.ZonedDateTime.now().plusHours(1), '6'], [time.ZonedDateTime.now().plusHours(2), '5'], [time.ZonedDateTime.now().plusHours(3), '4']].forEach(s => timeSeries2.add(s[0], s[1]));
items.getItem('testPersist1').persistence.persist(timeSeries, 'inmemory');

Create chart

config:
  label: testPersist
  future: 0.75
slots:
  grid:
    - component: oh-chart-grid
      config: {}
  xAxis:
    - component: oh-time-axis
      config:
        gridIndex: 0
  yAxis:
    - component: oh-value-axis
      config:
        gridIndex: 0
  series:
    - component: oh-time-series
      config:
        name: persist0
        gridIndex: 0
        xAxisIndex: 0
        yAxisIndex: 0
        type: line
        item: testPersist0
        service: inmemory
    - component: oh-time-series
      config:
        name: persist1
        gridIndex: 0
        xAxisIndex: 0
        yAxisIndex: 0
        type: line
        item: testPersist1
        service: inmemory
  tooltip:
    - component: oh-chart-tooltip
      config:
        show: true
Image

Same data for both persistence values. The first is correct, the second is incorrect.

Environment

version: 5.1.0
buildString: Release Build

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior of the Core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions