If you’ve got an IKEA Bekant sit/stand desk and are interested in this sort of thing then Megadesk[1] and Megadesk Companion[2] will allow it to connect to Home Assistant for automation (and also adds memory states).
(This post emphatically not endorsed by my employer.)
(This post emphatically not endorsed by my employer.)
[1] https://github.com/gcormier/megadesk
[2] https://github.com/gcormier/megadesk_companion