Skip to content

Commit

Permalink
doc: Fix error data_generator example
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed Feb 1, 2021
1 parent 95c0433 commit 6d1c7a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ Let's take this example:
- entity: sensor.test
data_generator: | # This is what builds the data
return entity.attributes.PeakTimes.map((peak, index) => {
return [new Date(peak), entity.attributes.PeakHeights[index]];
return [new Date(peak).getTime(), entity.attributes.PeakHeights[index]];
});
```
The result of this function call would be something like: <br/>
Expand Down

0 comments on commit 6d1c7a0

Please sign in to comment.