IhorSyerkov / linak-desk-card

Home Assistant Lovelace Card for controlling desks based on linak bluetooth controller.
MIT License
62 stars 12 forks source link

card showing incorrect height #31

Open pab-nguyen opened 5 months ago

pab-nguyen commented 5 months ago

Checklist:

Release with the issue: v1.6.0. Last working release (if known):

Browser and Operating System: HAOS

Description of problem: The card shows the incorrect height value. It seems like the height is the sum of minimum + the current height? For example, this is the current sit preset, which should be 73 cm but shown as 134 cm (the desk max is 128 cm)

image

Javascript errors shown in the web inspector (if applicable):

Additional information:

jhesketh commented 4 months ago

I have this problem too. I'm not sure how maintained this card is anymore sadly.

I did find https://github.com/IhorSyerkov/linak-desk-card which has a fix for this bug. However, the fix hardcodes the min/max height of the desk, so your mileage may vary.

My solution is to use a template to create a height relative to the starting position. I can then use that height as the height_sensor in the card setting. For example: image

Hope that helps!