-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More options for conditional chips #154
Comments
As a workaround for now, your can define a |
That's... quite clever. |
Hi, i would also like to use within the conditional chip a custom card i.e. i use this card on my dashboard:
|
Trying to think of a way to template out a conditional chip that displays whether or not the current user is a specific person. Would anyone be able to show me how to template out an is_user binary_sensor using the
|
Use this card instead? |
Thanks for the reply @davidcoulson. Im just trying to implement what @piitaya mentioned above for my specific use case. |
I tried doing a conditional chip but the alignment was all out of wack. Ended up with this which is more verbose but works. Leaving it here in case anyone else needs an example:
|
Thanks for sharing. |
This would be absolutely awesome to be able to create advanced conditionals without resorting to binary sensors. I think it would be fine without a UI for more advanced users. 😊 |
Actually there's no need to build a complex editor: Currently you can add multiple (and connected) conditions based on entities.
|
Would it be possible to use the state or attribute of a sensor as the condition:
I want to show devices where the battery level is less than a input_number slider |
Hello I tried to make a conditional chip with extended conditions. Example "state" >=1000 chip shows up with color orange, if "state" >=1800 icon is changing to red, under 1000 chips has nothing to show. Is there any update in this direction? (chip template) |
Now It works as I want, but a conditional template with operators would be really nice. My config would be better if sensor (sensor.netatmo_co2_indoor_mainunit_0) would be declared as a variable over all.
|
@orimate You can use entity variable (https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/template.md#description) : - type: template
entity: sensor.netatmo_co2_indoor_mainunit_0
icon: |-
{% if states(entity) | float >= 1000 %}
mdi:molecule-co2
{% else %}
{% endif %} |
For now, there is no way to use template in condition because there is performance issue with template so I prefer to keep template for template card and template chip which are more advanced chips. The workaround to do this is to write a |
I had poked around with this locally, and have been running a totally hacked together implementation for a while. I have it set up such that if the template returns 1, the desired chip shows, otherwise it will be hidden. Essentially just an inline binary_sensor. This was really nice for quick one offs that I hadn't wanted to make a new template sensor for, but now that we have the ability to define template helpers in the gui I had started converting my conditions to them. Maybe there are some other nice to haves that others can think of that would make this a more appealing option still? |
🚨 Spoiler alert 🚨 It's introduced with this PR #1269. It will be available with |
hi, is there any plan to use for chip the type card? like i mentioned above, i would like to use a custom card |
Would be good to have some more options for Conditional Chips - i.e. < > <! !>
Is / is not works for lights and switches, but not for sensors.
The text was updated successfully, but these errors were encountered: