Closed noxhirsch closed 3 years ago
The second part is an upcoming feature of state-switch.
I've already subscribed to releases for state-switch after your sneak-peek :) At this moment I'm testing the state-switch-card and loving it - thank you! :)
not really sure if this is still under development, but being able to see the toggle on a switch entity would be really nice:
- type: custom:template-entity-row
entity: switch.sw_boiler_bijkeuken_sc
active: >
{{is_state(config.entity,'on')}}
secondary: >
Actueel verbruik: {{states('sensor.boiler_bijkeuken_actueel')}} watt
shows the state, and not the toggle:
forgive me if this was posted elsewhere already (think I did it myself, but couldn't find it in this repo....)
polite nudge... did you ever consider this? adding the possibility of the toggle (instead of state) if entity is a switch?
Yes a toggle option would be great..
So where´s the toggle "feature"? Would be really awesome. I digg deeper and depper into the UI modification world of @thomasloven and really love it! Combining a few of his frontend hacks results in really powerful options.
I currently need to... a) use the secondary_info for a specific text and b) use the tap_action "navigate" and c) use the switch/toggle
...in one specific use-case so at the moment I need to (ab)use 'custom:auto-entities' for this which does everything except fulfill requirement a) which is why I was looking into the 'custom:template-entity-row' - which on the other hand lacks support of c) 👎
+1 for the toggle support instead of state text (on/off) ! :-)
So I can replace that code
type: 'custom:auto-entities'
card:
type: entities
title: ''
state_color: true
show_header_toggle: false
card_mod:
style: |
ha-card {
text-align: center;
letter-spacing: 1px;
font-weight: bold;
border: 1px solid grey;
padding: 0px;
background: default;
}
entities: []
filter:
include:
- entity_id: input_boolean.gui_global_details
options:
name: 'DETAIL-GRAD: Alles zeigen'
secondary_info: last-updated
tap_action:
action: navigate
navigation_path: /lovelace/default_view
hold_action:
action: more-info
exclude: null
show_empty: false
unique: true
sort:
method: none
by that shorter one (and as I have those lines plenty of times across all my dashboards it will have a quite good positive impact) 👍
type: entities
title: ''
state_color: true
show_header_toggle: false
entities:
- type: 'custom:template-entity-row'
name: 'DETAIL-GRAD: Alles zeigen'
secondary: (zurück zu HOME)
entity: input_boolean.gui_global_details
toggle: true # <<< This is what we´re looking for! :-)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) >>>
tap_action:
action: navigate
navigation_path: /lovelace/default_view
hold_action:
action: more-info
card_mod:
style: |
ha-card {
text-align: center;
letter-spacing: 1px;
font-weight: bold;
border: 1px solid grey;
padding: 0px;
background: default;
}
Toggle support (instead of displaying state) would solve a lot of requirements here as well.
Added in 1.3.0
In words too: thank you very much, makes this magical card even more versatile. Much appreciated!
Exactly: More than great.
I'm thinking every day at nearly every requirement I have, how great it would be, if directly in HA and in general, every (!) lovelace/UI yaml string would accept jinja2 and every config yaml string as well. Directly. Every string. This would make live such easier and a lot of workarounds not needed anymore.
Thank You. wait for this function for long time.
Hi, this is a great card, thank you! It would be cool to have the option to use a toggle. Then I could use the toggle to switch an entity and use the left side to show some information about this entity.
By the way: It would be amazing to have the conditional row as "advanced conditional card"! This would get the conditional card a whole new world of options (especially to react on device ids etc). (sorry that I added this here - didn't want to open an extra issue for something that has just barely to do with this card)