Expose a slider from custom integration

Hola!

I’m working on a custom integration for HomeAssistant to control a local HRV system (Buva Ecostream). You can find the code written here: Github.

So far, I can get data from sensors into HASS. However, I also want to control the speed of the fans from home assistant. To do that, a json body must be sent over the websockets connection in the following stye:

{
    "config": {
        "man_override_set": 60.000000,
        "man_override_set_time": 900
    }
}

How can I have a service in homeassistant exposed from the code, to add a slider to HASS which sets the value for man_override_set (between 60 and 150)?

Sorry if this is a stupid question! I’m pretty new to HASS and trying to figure things out!

Thanks in advance!

Create a number entity with its mode set to auto, which will display as a slider ans use the set_native_value method to pass your json to your websocket when it is changed.

That did the trick, thanks a lot!

Hey, thank you for creating this integration!
I’ve been looking for an integration for the Ecostream for a long time now…

However, I’m struggling to setup your integration. Could you help me with this?
Steps taken:

  • Download copy of repository
  • Copy folder ‘ecostream_homeassistant_integration’ into /custom_components
  • Restart Home Assistant

However, the service and sensor aren’t being created.

Hope to hear from you on how to fix it! Thanks in advance.

Hey, sorry I didn’t log in to the forums in a while so I missed this.

Could you please provide me any logs on why it’s not working? Have you already added and enabled the integration?

It should show something like this:


Thank you for your response. I completely forgot about the ‘add integration’ part after moving the install files into Home Assistant. All is working now, thanks!