Summary
- History questions about a device that changes state often now get the right answer. A light that toggled about 100 times in a day could come back as all "off", so the agent said it never turned on (#715).
Patch release on top of 3.44.0; nothing else changes.
Details
Fixed
- History answers about a device that changed state often no longer leave out one of its states. When a period held more than 50 entries, the history tool kept every second or third one, so a light that toggled about 100 times in a day came back as 53 entries all "off" and the agent said it never turned on (#715). With an odd step both states survived, but changes in between were still dropped, so times, counts and durations could be wrong. Rows that only repeat the previous state (a thermostat records one each time its temperature reading updates) are now dropped first, so the limit counts real changes. Over 50 changes, the agent gets the latest 50 in full, the state at the start of the period, and for each state over the whole period: how many times it was entered, when first and last, and how many minutes it lasted. A brief drop to unavailable and back no longer counts as turning on again. Numeric sensors, including ones with no state class, are still thinned to 50 readings, and now always include the latest one.