Count option in sorting skips elements
See original GitHub issueI use the following to show last 5 triggered automations:
type: 'custom:auto-entities'
card:
type: entities
title: "\U0001F916 Last triggered automations"
state_color: false
show_header_toggle: false
filter:
include:
- domain: automation
options:
secondary_info: last-triggered
exclude: null
show_empty: false
unique: false
sort:
method: last_triggered
reverse: true
count: 5
Unfortunately, this does miss or skip entities which definitely match the filter (double checked by logbook and developer tools). Made me think I´m nuts but finally I could track it down:
- I tested with “domain: automation” and "entity_id: ‘automation.*’ but that makes no difference.
- Also the created card does not make any difference (tested entities and logbook).
- The missed elements are shown when
count: 5
is removed or set to a high number, e. g. 100. Then it´s shown at the bottom end of the list.
Here you can see the missed one:
I think there´s a bug with the count function. Unfortunately I can´t provide any more debug information.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
What is wrong in this sorting array skipping some elements?
You cannot only sort some items using the Array#sort() method - you either sort all or none. You don't define the position of...
Read more >Counting Sort - GeeksforGeeks
Counting sort is a sorting technique based on keys between a specific range. It works by counting the number of objects having distinct...
Read more >Sorting results from SKIP, LIMIT, or FIRST queries - IBM
Queries that combine the SKIP and the FIRST or LIMIT options with the ORDER BY clause impose a unique order on the qualifying...
Read more >Excel not sorting numbers correctly - smallest to largest etc.
When I filter or sort the numbers from smallest to largest there are numbers , in the 6200 to 6800 range, missing where...
Read more >Skipping Records Last Updated September 2, 2022 - TechDocs
Use the STOPAFT option to stop sorting before the end of a file. · For example, to sort EMPLOY DATA A in alphabetical...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Try release 1.9.0
Will test it on other places as well but think we´re good as v1.9.1 seems to have fixed this.