Closed gitolicious closed 1 year ago
A similar issue occurs when using the "Sit-Stand Reminder". The countdown of the minutes to the next reminder is interpreted as desk height. My first guess was identifying the =
(top and bottom of 7-segment on) in the first digit, but as it is flashing, that is not reliable. The display readings can be seen in this video:
https://www.youtube.com/watch?v=jMbdhi_SUtE
My approach would be to identify numbers <100 that don't use the decimal point. 99 is the highest reminder time which is shown as =99
or 99
whereas a desk height of 99cm will be shown as 99.0
.
After giving it some more thoughts, I changed my original solution of detecting symbols in #45 to simply checking if the first digit is showing a valid number. This not true for all error or sit-stand displays, so these values are discarded.
Just a small issues I came across: When going all the way down with my desk, E03 is shown in the display (not sure if that's normal, but that's what it does). The script interprets this as 3cm desk height and reports it to HomeAssistant. Probably it would be a good idea to check for
E
in the first digit and not update the height if it is recognized.The error can be seen in this video: https://www.youtube.com/watch?v=TS27ZzjOrfk