linak-desk-card
linak-desk-card copied to clipboard
Add support for the new HA idasen_desk integration
Is your feature request related to a problem? Please describe. The https://github.com/j5lien/esphome-idasen-desk-controller repository has now been archived since the Idasen Desk is now compatible with Home Assistant and ESPHome Bluetooth Proxy https://www.home-assistant.io/integrations/idasen_desk
Describe the solution you'd like Would it be possible to update the linak-desk-card to be compatible with the new official idasen_desk integration?
Describe alternatives you've considered This linak-desk-card looks a lot nicer than the default HA cards that can be used for covers.
Completely agree! Can we have it working?
I made a fork that can work with the new height sensor: https://github.com/bernikr/linak-desk-card
To use it:
- uninstall the lineak-desk-card in hacs
- add
https://github.com/bernikr/linak-desk-card
in hacs as a custom repository - install the new lineak-desk-card
- make sure the desk height sensor in home assistant is set to cm and not any other unit.
I dont have the time to maintain the fork properly so I hope @IhorSyerkov will be able to incorporate it into the main card. Right now it doesn't support the connection state and min and max_height from the config are ignored and set to 62 and 127 respectively, which are the limits of the desk height sensor.
Thanks for setting up that fork. Some additional notes I have around using that with the HASS integration...
- I needed to enable the height sensor. It was disabled by default.
- I needed to change height unit of measurements to
cm
(it defaulted toft
for me in USA). - To get the "connection" and "moving"
binary_sensors
, I had to do the following:- Add statistics sensor that tracks the height change. I think at present this is still a YAML only feature? Mine looks something like this:
sensor: - platform: statistics unique_id: office_desk_height_change name: 'Office desk height change' entity_id: sensor.office_desk_height state_characteristic: change_sample max_age: seconds: 1 sampling_size: 2 precision: 3
- Add 2 binary template sensor helpers (
Settings
>Devices & Services
>Helpers
>Create Helper
>Template
>Template a binary sensor
) configured as the following:- "Office Desk Connected" with a template of
{{ not is_state("cover.office_desk", "unavailable") }}
- "Office Desk Moving" with a template of
{{ is_number(states("sensor.office_desk_height_change")) }}
- "Office Desk Connected" with a template of
- Add statistics sensor that tracks the height change. I think at present this is still a YAML only feature? Mine looks something like this:
Then you should be able to use those 2 binary sensors as the connection status and moving sensors in the linak card.
May also need additional configuration for those of us with a height offset configured (to account for a custom top). When my desk is at 28in, Home Assistant is reporting it as 28.47in. But maybe there is a chance to get this added to the official plugin (or a fork), since I know that offset value is available somewhere in the bluetooth data (shows in the Linak Desk Control app, and some python bluetooth stuff I experimented with when I originally set up my desk).
@ammmze - Thanks a lot for sharing those! Do you know if it would also be possible to add one for the speed like esphome-idasen-desk-controller has?
@ammmze - Thanks a lot for sharing those! Do you know if it would also be possible to add one for the speed like esphome-idasen-desk-controller has?
I haven't tried it, but I'm looking over the statistics documentation and I see a state_characteristic
you can use named change_second
, which I think would give you speed as cm/s.