Giter Site home page Giter Site logo

Comments (8)

piitaya avatar piitaya commented on May 22, 2024

The chip color is only applied when entity state is active (armed for alarm for example). It's the same behaviour than entity card.
Maybe we should edit the label or display this info in the editor.

from lovelace-mushroom.

piitaya avatar piitaya commented on May 22, 2024

It's a documenation issue, this should be fixed when #73 will be done

from lovelace-mushroom.

bemble avatar bemble commented on May 22, 2024

@piitaya maybe we could create an alarm chip, like the light chip?

from lovelace-mushroom.

brandensilva avatar brandensilva commented on May 22, 2024

@piitaya I see. Why not support both colors? Similar to how we think about "on" and "off" states having two distinct states, it seems like it would be beneficial if the colors could support both of those to cover all the use cases around that.

from lovelace-mushroom.

piitaya avatar piitaya commented on May 22, 2024

For entity chip, the rules are :

  • entity is inactive (off, disarmed, not_home) : non-colored state
  • entity is active (on, playing, armed, home, etc...) : colored state

For entity card, the rules are :

  • entity is inactive (off, disarmed, not_home) : disabled state
  • entity is active (on, playing, armed, home, etc...) : colored state

I think we must create an alarm chip as proposed by @pierrecle to have the same color rules than the alarm panel card.

from lovelace-mushroom.

brandensilva avatar brandensilva commented on May 22, 2024

I gotcha. I'm less familiar with the code base at this point but out of curiosity why do entity chips function differently than entity cards regarding their color states?

I'm not opposed to an alarm chip either but it seems like it is always a necessity to make new chips to accommodate the behavior people might be expecting to function similar to entity cards.

from lovelace-mushroom.

piitaya avatar piitaya commented on May 22, 2024

Today we have the same behaviour for entity chip and entity card : only two state and two colors (colored when active, uncolored when inactive)

Your alarm is disarmed so it's considered as inactive for entity card and chip => uncolored

Alarm card have multiple state and colors :

  • triggered : red
  • armed : green
  • disarmed : blue
  • unavailable : grey

If we want chip with these colors, we need to have an alarm chip because entity have only 2 states : colored when active, grey when active (like entity card)
What behaviour do your want with your chip?

from lovelace-mushroom.

brandensilva avatar brandensilva commented on May 22, 2024

Ah right for some reason I thought I was using an alarm chip but you are right, it's just an entity chip for the alarm control panel entity. My mistake.

Yeah, I think the alarm chip should operate the same as the alarm card then with the 4 colored states. Because I only use the alarm chip for knowing the state of something and rarely have to change it myself (due to automations handling that side) it would be useful to have it as it's a much more compact form of displaying the needed alarm info as shown:

image

from lovelace-mushroom.

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.