Git Product home page Git Product logo

Comments (10)

alextud avatar alextud commented on August 18, 2024

For controlling device from HA, ex: speed in/out - default interface provided by HA is use, and there is not much control to add UI elements. In this case you can switch between manual / auto mode to have speed in/out reseted ...

Regarding automations i'm using NodeRed + HA websocket integration -> https://nodered.org
as it provide much granular control... but prana device is exposed as a fan device in HA so you can do automations within HA as well... https://www.home-assistant.io/integrations/fan/

from ha-prana.

alextud avatar alextud commented on August 18, 2024

EX: nodred integration
Screenshot 2021-10-13 at 13 07 34

from ha-prana.

luciandf avatar luciandf commented on August 18, 2024

i have tried the Auto mode but it doesn't reset the speed in/out.

is there no way to make those speed direction buttons to be pressed together in order to turn on speed In/Out?

Regarding automations, I have seen that prana is a fan and I know how to do automations with HA but what I don't understand is how to access the speed_in/speed_out attributes from here:

image

from ha-prana.

alextud avatar alextud commented on August 18, 2024

using fan.set_direction

@property
def current_direction(self) -> str:
    """Fan direction."""
    if not self.device.speed:
        return None
    elif not self.device.isAirInOn:
        return "forward"
    elif not self.device.isAirOutOn:
        return "reverse"
    else:
        return "reverse & forward"

from ha-prana.

alextud avatar alextud commented on August 18, 2024

For the set direction, we can add an empty string to switch to default, currently is not implemented:

def set_direction(self, direction: str):
    """Set the direction of the fan."""
    if direction == 'reverse':
        if not self.device.isAirInOn:
            self.device.toogleAirInOff()

        self.device.toogleAirOutOff()
    elif direction == 'forward':
        if not self.device.isAirOutOn:
            self.device.toogleAirOutOff()

        self.device.toogleAirInOff()

    dispatcher_send(self.hass, SIGNAL_UPDATE_PRANA + self.device.mac)

from ha-prana.

luciandf avatar luciandf commented on August 18, 2024

I am sorry, but I can't figure it out. This is what I have as options in HA:
image

It appears that the Auto preset works when I select it. And sets the fan on the auto mode where you can select the speed level from 1 to 10.
But if I try to set an In speed and a different out speed from the fan card it only does one direction.

image

With nodered works to set different speeds for the in and the out dirs? I have never used nodered.

from ha-prana.

luciandf avatar luciandf commented on August 18, 2024

would it not be possible to set an option where both those arrows for direction (in the second picture above) can be pressed at once? and that would mean In and Out. Sorry I am not a programmer and don't know the complexity of what i am asking!

Also, the speed slider could be so that if both are pressed, then there is one slider for both and if only one is pressed then the slider is Speed IN (for the In dir) and Speed OUT (for out).

And if these features could be accessed from an automation would be amazing.

from ha-prana.

alextud avatar alextud commented on August 18, 2024

I will try to see what's possible ...

from ha-prana.

luciandf avatar luciandf commented on August 18, 2024

as I said before, I am not a programmer and don't know much but I am curious and I have been looking around in your code and in the code for the fan integration in HA. There they have the following for the direction:

set_direction:
  name: Set direction
  description: Set the fan rotation.
  target:
    entity:
      domain: fan
  fields:
    direction:
      name: Direction
      description: The direction to rotate.
      required: true
      selector:
        select:
          options:
            - "forward"
            - "reverse"

While in your code you have the possibility of a "forward & reverse " option. Can this option ever be satisfied with the current fan integration? I mean I don't see how both directions can be turned on at the same time.

from ha-prana.

adysxp avatar adysxp commented on August 18, 2024

Hi @alextud ,

can you help me with an email address? Thanks a lot!

from ha-prana.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.