Git Product home page Git Product logo

Comments (6)

DavidMStraub avatar DavidMStraub commented on September 24, 2024

Sorry, I forgot to repy to this issue.

I tend to think that when no information about progress is available to the component, "unavailable" is an appropriate status, no? Since the progress is reported only at certain intervals, this could also apply e.g. when HA is started while a program is running, until progress is reported/changed for the first time.

from homeassistant-homeconnect.

emilp333 avatar emilp333 commented on September 24, 2024

If the program have started it should be 0%. I think the component needs to trigger certain updates of other sensors when program is started and finished.

from homeassistant-homeconnect.

DavidMStraub avatar DavidMStraub commented on September 24, 2024

The problem is that triggering the start of a program does not mean the program actually starts. For instance, it could be that the "remote start" on the device is deactivated. So I think it is consistent if the progress starts to be 0% once the API event stream reports that the program is actually running. I think this is not a problem though as this should happen immediately after the program starts (in theory). Not sure this is what you meant.

from homeassistant-homeconnect.

FlavorFx avatar FlavorFx commented on September 24, 2024

When by washing machine is switched on again and returns to my network, all entities still remains unavailable. Is there a change to update the adapter right after wake up again and returned to the network? 'Unavailable' for each entities doesn't look quite nice in the UI.

from homeassistant-homeconnect.

SeraphimSerapis avatar SeraphimSerapis commented on September 24, 2024

I countered that by implementing a template sensor that leverages the switch and the attributes it populates while in operation:

mr_coffee_current_progress:
    friendly_name: 'Progress'
    entity_id: switch.mr_coffee
    unit_of_measurement: '%'
    value_template: >
      {% if state_attr('switch.mr_coffee', 'active_program') %}
        {{ state_attr('switch.mr_coffee', 'program_progress') }}
      {% else %}
        0
      {% endif %}
    icon_template: >
      {% if state_attr('switch.mr_coffee', 'active_program') %}
        {% if is_state_attr('switch.mr_coffee', 'program_progress', 100) %}
          mdi:progress-check
        {% else %}
          mdi:progress-clock
        {% endif %}
      {% else %}
        mdi:progress-check
      {% endif %}

from homeassistant-homeconnect.

emilp333 avatar emilp333 commented on September 24, 2024

Hi David,

Sorry for not updating this in a proper time.
What I mean is that I think your component should be more smart than only publishing exactly what comes from the API. I mean right now its kind of only provides API sensors.

You should use the information in the API and then build logic around it. If a program starts it will tell you that but it will not send an update about the progress until it reaches 1%. But the component knows that the program started and could update the progress by itself to 0%. Same goes when a program has finished.

What I'm saying is that I think this component deserves to be more than API sensors. It should read the events and do some logic as well. It does not makes sense to build extra template sensors when this could be built in to the component.

from homeassistant-homeconnect.

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.