Code Monkey home page Code Monkey logo

Comments (6)

dylandoamaral avatar dylandoamaral commented on May 28, 2024

Hi you can try to simulate the expected behaviour using a low granularity such as a big´hours_to_show´ and using the background color for color.half, color.none and color.ko. Tell me if it solves your problem, it can be an interesting example for the read me section. I don't have my pc right now so I can't try it myself.

from uptime-card.

arsaboo avatar arsaboo commented on May 28, 2024

So, I changed the config to the following:

      - type: 'custom:uptime-card'
        entity: climate.bedroom
        attribute: hvac_action
        hours_to_show: 192
        ko: 'heat'
        ok: 'cool'
        icon: 'mdi:thermostat'
        name: Master Thermostat
        status_adaptive_color: true
        color:
          ok: '#FFFFFF'
          ko: '#F27720'
          half: '#FFFFFF'
        alias:
          heat: Heat
          cool: Cool
        show:
          footer: false
        alignment:
          status: spaced
          header: left
          icon_first: true

Here's the output.
image

There is one blank bar. But, I think the bigger problem is that the card divides time into equal intervals. However, the HVAC can run for different time periods (see below)

image

I am thinking that the same should be true for any sensor (meaning sensors can stay on for only part of the interval that the card is using).

from uptime-card.

dylandoamaral avatar dylandoamaral commented on May 28, 2024

Now set bar.spacing at 0 and bar.amount as hours_to_show (or even more) and tell me how it looks like !

from uptime-card.

arsaboo avatar arsaboo commented on May 28, 2024
      - type: 'custom:uptime-card'
        entity: climate.bedroom
        attribute: hvac_action
        hours_to_show: 200
        ko: 'heat'
        ok: 'cool'
        icon: 'mdi:thermostat'
        name: Master Thermostat
        status_adaptive_color: true
        color:
          ok: '#FFFFFF' # #2DA8E0
          ko: '#F27720'
          half: '#FFFFFF'
        alias:
          heat: Heat
          cool: Cool
        show:
          footer: false
        alignment:
          status: spaced
          header: left
          icon_first: true
        bar:
          spacing: 0

Here's how it looks:
image

I still think this is not right and the problem is bars of the same size. Note that the HVAC can run for 1 minute at some time and for maybe 5 minutes at another. Also, having a very large hours_to_show defeats the purpose. Notice in the ecobee chart, it is quite granular.

from uptime-card.

dylandoamaral avatar dylandoamaral commented on May 28, 2024

I mean what you really need is a new card doing exactly what you are asking for, which is not the purpose of this card.

I can't implement what you asking since it is not corresponding to everyone needs and it will transform the card into a Frankenstein monster.

I still think you can manage to obtain something very similar using a better granularity and a bit of tweeking. You can either fork this card and implement exactly what you need in JavaScript or you can try to increase the bar.amount to simulate the expecting behaviour. You can't have a minute granularity showing an entire week of data since every minute would be represented by less than a pixel but I think you can for example have a granularity of 5 minutes in a day it would means a hours_to_show of "24" and a bar.amount of "288"(24*12).

It will naturally create "larger bars" by simply combining more thin evenly spaced bars representing a small amount of time if they are not spaced.

from uptime-card.

arsaboo avatar arsaboo commented on May 28, 2024

Understand....will close the issue for now.

from uptime-card.

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.