abmantis / idasen-ha

Home Assistant helper lib for the IKEA Idasen Desk integration
MIT License
2 stars 1 forks source link

Add sensor for moving state #14

Closed angusgthompson closed 9 months ago

angusgthompson commented 11 months ago

Just moved to using the home assistant Integration for my Idasen desk instead of https://github.com/j5lien/esphome-idasen-desk-controller. I miss the sensors that came with the other project, allowing me to monitor if the desk was being controlled by the physical lever, and then I could add an automation from that that would allow me to convert a double press to set a certain position. (e.g. double press up sets auto changes the desk to stand height etc.)

Is it possible to add a similar sensor to this? Either precise desk height or moving state.

abmantis commented 11 months ago

Desk height is already available, it is part of the state of cover entity in HA.

angusgthompson commented 11 months ago

Yeah I get that it's available as a percentage there, but it's not as exact as I could get from the other project - basically meaning if I just tap the manual lever, I can't tell with home assistant if it has been tapped or not. With either an exact height, or a "moving/not moving" state sensor I could tell if the lever has been tapped

abmantis commented 11 months ago

Oh, I see! That is really interesting use case. I'll add it to the TODO list! Thanks!

angusgthompson commented 11 months ago

Thanks mate for the swift responses. It's handy to quickly select "sit" or "stand" height with the normal lever (although a little hacky).. Looking forward to it if you get round to it.

protyposis commented 10 months ago

Desk height is already available

Would it be possible to expose it as absolute height (in centimeters or meters) through HA? Or is there a technical limitation for using percent?

abmantis commented 10 months ago

Desk height is already available

Would it be possible to expose it as absolute height (in centimeters or meters) through HA? Or is there a technical limitation for using percent?

It is possible, but since you already have the percentage, what would be the use case for having it in meters?

protyposis commented 10 months ago

Thanks, there's no specific use case, I just thought it would be more intuitive. Maybe I'm too used to the Linak control software (which displays centimeters) 😄

abmantis commented 9 months ago

Hey. I've added support for the height in meters. It is currently approved and just missing the docs: https://github.com/home-assistant/core/pull/103324 I will most likely not be able to work on that on the next days. Anyone wants to help with that? :)