Coder Social home page Coder Social logo

Fan entity speed settings about architecture HOT 9 CLOSED

cdce8p avatar cdce8p commented on August 28, 2024 4
Fan entity speed settings

from architecture.

Comments (9)

cdce8p avatar cdce8p commented on August 28, 2024 1

@sknsean Unfortunately, I don't have time to implement any of it. And besides the issue has probably been stale for far too long. Maybe someone else will pick up this topic in the future.

from architecture.

schmittx avatar schmittx commented on August 28, 2024

I definitely agree that some improvement needs to be made for fan speed, it's too inconsistent
currently.

My concern with using an int value between [0,100] for speed is that it's not clear how many discrete speed options there are for the entity.

An alternative approach might be:

  • speed_list would contain only discrete speed values like SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH, 0001, 0002, etc.
  • SPEED_OFF would be deprecated to prevent confusion, state should be used to show STATE_ON and STATE_OFF
  • A new attribute,mode or operation_mode (like climate), would be added to indicate auto, smart, manual, etc.
  • A section would be added to the dev pages to explain the attributes and expected values for each domain

With the above approach; secondary platforms, like HomeKit, that use percentage-based speed can read the length of speed_list to determine the correct interval step between [0,100]. This would allow for a more intuitive interface for users when using secondary platforms (ex. Home app with HomeKit). Secondary platforms can also read operation_mode to set an appropriate mode characteristic.

Finally, this approach may be less of an overhaul from the current architecture and therefore easier to implement than changing speed to an int value between [0,100].

from architecture.

balloob avatar balloob commented on August 28, 2024

We should definitely specify the speed constants that are allowed to be used. Dyson would need to map their 0001 etc to one of our values.

from architecture.

cdce8p avatar cdce8p commented on August 28, 2024

I was thinking about this issue again. What if we use an approach similar to the light brightness parameter, by defining an additional speed_pct?

Some advantages:

  • Full backwards compatibility
  • We don't need to limit ourself to just 4 predefined mode => better support for dyson
  • Each component can implement the conversion itself. It might make sense to move the most dominate one to a util class though.

I would imaging that a future roadmap could look something like this:

  1. New fan platforms must support speed_pct
  2. Change frontend (use slider instead of dropdown)
  3. Deprecation and later removal of speed and speed_list

To better illustrate my idea, I will post a link to a WIP PR shortly.


Update
Link to the PR: home-assistant/core#15030

from architecture.

balloob avatar balloob commented on August 28, 2024

I rather have a hard cut off, not sure why we wait to make the breaking change if we are going to make a breaking change?

from architecture.

itineric avatar itineric commented on August 28, 2024
  1. Change frontend (use slider instead of dropdown)

Even if many fans use percents to define speed internally, many of them are "step-based", meaning that 1->20% = speed 1, 21->40% = speed 2, etc.
So I dont think that using a slider in all cases is a good idea.

from architecture.

sknsean avatar sknsean commented on August 28, 2024

any news on this?
Can anyone point to a place where the discussion is ongoing?

from architecture.

sknsean avatar sknsean commented on August 28, 2024

Is there at solution for this? Since the closing :-)

from architecture.

mime29 avatar mime29 commented on August 28, 2024

Any discussion about this topic somewhere?
Homekit allows to slide up and down the ON/OFF button. It seems that on Apple's side it's do-able.
That would free us from using the AC remote control at all.

from architecture.

Related Issues (20)

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.