RogerSelwyn / mqtt_discoverystream_ha

Extension of HA mqtt_statestream integration with discovery config publishing
3 stars 5 forks source link

Add ability to provide cover opening percentage #11

Closed Matsuo3rd closed 5 months ago

Matsuo3rd commented 6 months ago

Add ability to provide cover opening/closing percentage, on top of current OPEN, CLOSE and STOP modes. I am a Python complete newbie so feel free to criticize the code.

RogerSelwyn commented 6 months ago

I believe it is more complex than this since at the moment I don't believe the remote instance cover will be configured to support set_position. I think SupportedFeatures will at max show 11, which does not include set position or set tilt.

I'll try to add support for all features. But given I have no covers of my own, I'm using a light masquerading as a cover via a cover template.

RogerSelwyn commented 6 months ago

Hi @Matsuo3rd can you take a look at the latest pre-release v1.2.4 - https://github.com/RogerSelwyn/mqtt_discoverystream_ha/releases

The code is substantially different to your PR since it needed extra command topics configuring setting (set_position and set_tilt). For reference this documents how mqtt cover is configured - https://www.home-assistant.io/integrations/cover.mqtt/

Matsuo3rd commented 5 months ago

Hello @RogerSelwyn. Thank you so much for putting this all together. My PR is indeed way too simplistic compared to your changes and expected implementation. Unfortunately I am traveling all week and won’t be able to test it until next weekend. Will keep you posted.

RogerSelwyn commented 5 months ago

Closed since code now included.

Matsuo3rd commented 5 months ago

Hey @RogerSelwyn! Just to report I am super happy with latest change from 2.0.1 which completely covers mu use case. Many thanks for your hard work and contribution!

RogerSelwyn commented 5 months ago

No problem. I've been doing major stuff recently to make it more extensible with less effort. Hopefully it will get onto HACS in a few months. I've put in the request, but it takes a long while....