Hey all, just wanted to share a card I made for the remote domain. May be useful, especially since the Harmony integration has move activity switches to deprecated. The card functions like a lot of multi-row cards, where the second row is hidden unless needed (in this case, when the remote is on).
Ive added a few buttons as examples, but with variables these could be changed to whatever you want.
Template code
remote_large:
show_icon: false
show_name: false
show_state: false
styles:
card:
- border-radius: var(--border-radius)
- box-shadow: var(--box-shadow)
- padding: 12px
grid:
- grid-template-areas: |
[[[
var areas = "'remote'";
if (entity.state == 'on'){
areas = areas + " 'buttons'";
}
return areas;
]]]
- grid-template-columns: 1fr
- grid-template-rows: |
[[[
var rows = "min-content";
if (entity.state == 'on'){
rows = rows + " min-content";
}
return rows;
]]]
- row-gap: |-
[[[
if (entity.state == 'on') {
return "12px";
} else {
return "0px";
}
]]]
custom_fields:
buttons:
- display: |
[[[
if(entity.state == 'on') {
return "block";
}
return "none";
]]]
custom_fields:
remote:
card:
type: "custom:button-card"
template:
- icon_info
styles:
card:
- border: none
tap_action:
action: toggle
entity: "[[[ return entity.entity_id ]]]"
name: "[[[ return entity.attributes.friendly_name ]]]"
label: >-
[[[
if (entity.state == 'on'){
var etat = "On - " + (entity.attributes.current_activity);
}else {
var etat = "Off";
}
return etat ;
]]]
state:
- operator: template
value: "[[[ return entity.state == 'on' ]]]"
styles:
icon:
- color: "rgba(var(--color-green),1)"
img_cell:
- background-color: "rgba(var(--color-green),0.2)"
buttons:
card:
type: "custom:button-card"
styles:
card:
- padding: 0px
- border: none
grid:
- grid-template-areas: '"item1 item2 item3 item4"'
- grid-template-columns: 1fr 1fr 1fr 1fr
- grid-template-rows: min-content
- column-gap: 7px
custom_fields:
item1:
card:
icon: "mdi:power"
type: "custom:button-card"
template: widget_icon
entity: "[[[ return entity.entity_id ]]]"
tap_action:
action: toggle
item2:
card:
icon: "mdi:volume-off"
type: "custom:button-card"
template: widget_icon
tap_action:
action: call-service
service: input_button.press
service_data:
entity_id: "[[[ return variables.remote_mute ]]]"
item3:
card:
icon: "mdi:play"
type: "custom:button-card"
template: widget_icon
item4:
card:
icon: "mdi:menu"
type: "custom:button-card"
template: widget_icon
entity: "[[[ return variables.remote_activities]]]"
tap_action:
action: more-info
Example use
- type: custom:button-card
template: remote_large
entity: remote.great_room
variables:
remote_activities: select.great_room_activities
remote_mute: input_button.remote_mute_great_room
1 Like
rexyboy
December 21, 2023, 7:17am
3588
Hi, I am creating a Minimalist dashboard for my bathroom Sonoff NSPanel Pro. In the bathroom are two heated towel rails that can be turned ON/OFF with HA Switches. I think I need to create a custom card that can be used so that I can change the switch between ON, OFF or enable a schedule (already available as another switch).
I have not created a custom card before. I have read through the docs and looked at a couple of templates but a bit lost on the best place to start. Can someone recommend a good starting card or a resource to read etc.
BTW: I already have Minimalist installed and working with some standard cards and chips.
Much appreciated.
jbruns1979
(Jbruns79)
December 22, 2023, 7:41am
3589
Thankyou!!! both binary sensor cards are fixed by doing this.
Forssux
(Guy Forssman)
December 22, 2023, 4:16pm
3590
This looks like a scene card , thereās a custom variant where scenes are rooms.
I hope wish that on 1 line I can have 2 scenes and 3 rooms
liminal
(Shane)
December 28, 2023, 1:51am
3591
Hey guys,
Im getting this error, not sure when it popped up, I havenāt looked for a while
In the doco I can see there was a breaking change a while back, but I seem to have that set or am I reading this wrong?
In fact Im not really sure what this meansā¦
show_last_changed
is changed to be used as variable:
variables:
ulm_show_last_changed: true
https://ui-lovelace-minimalist.github.io/UI/usage/cards/card_binary_sensor_alert/#usage
I have that set and its still not working?
Any help would be awesome
cards:
- type: "custom:button-card"
template: card_binary_sensor_alert
variables:
ulm_card_binary_sensor_alert: true
ulm_card_binary_sensor_alert_name: Dishwasher
ulm_show_last_changed: true
entity: binary_sensor.dishwasher_door
khangwei
(khangwei)
December 29, 2023, 7:58am
3592
Hi all
I am having trouble getting my popup to work with browser_mod. I have followed all instructions at browser_mod and was able to fire up a popup when in developer tools calling the service browser_mod.popup.
can anyone guide me on what is wrong here?
Thank you!
cards:
# Level 1
- type: "custom:button-card"
template:
- card_room
- red_on
name: Level 1
icon: mdi:home-floor-1
variables:
label_use_temperature: false
entity_1:
entity_id: switch.living_room_group
tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
dismissable: true
autoclose: false
title: Living Room
content: testing
templates:
- yellow_on
khangwei
(khangwei)
December 29, 2023, 9:04am
3593
after much trying, it looks like i cannot call browser_mod from within a variable/one of the four possible room card ā¦ one of the four subiconsā¦ I want to create a popup after click on the subiconsā¦ is that possible?? thank you v much for ur helpā¦
Andras
January 2, 2024, 1:28pm
3594
There was another breaking change, use
ulm_card_binary_sensor_show_last_changed
instead.
2 Likes
liminal
(Shane)
January 2, 2024, 11:39pm
3595
Yeah it seems the doco is wrong
Thanks for that
Hi everyone,
i have some new hue color lights and try to get the color palette working inside the popup. But i dont know which select entity i have to select?
Think its very simple but coudnt find anything about it.
Anyone a hint for this.
Thanks in advanced.
- type: "custom:button-card"
template: card_light_slider_collapse
entity: light.hue_color_luster_1
variables:
ulm_card_light_name: Wohnzimmer
ulm_card_light_enable_color: true
ulm_card_light_force_background_color: true
ulm_card_light_enable_popup: true
ulm_card_light_color_palette:
laurens362
(Laurens362)
January 7, 2024, 11:52am
3597
For some odd reason I need to restart HA every time after a change bluhgā¦ anyone know how to solve this?
GL-C
(Gl C)
January 8, 2024, 3:36am
3598
On struggle street with the custom person card , I donāt have a wifi device tracker for the āimswel person wifi trackerā. I assume that means i need to create a senor in my config. Anyone have some template code or other options?
i have the following error with the CAR card,
kdzoha
January 14, 2024, 8:41am
3602
why is the adapative ui doing thisā¦ Iām at the setup phase trying to do the most absolute vanilla thing with popup cards for lightsā¦
popup.yaml
---
type: "custom:state-switch"
view_layout:
grid-area: "popup"
show:
# only show when screen-width is larger than 1100px
mediaquery: "(min-width: 1100px)"
# add your input_select
entity: input_select.minimalisthelper
default: default
transition: slide-down
transition_time: 1000
# options set in the input_select
states:
# Devices
# Lights
light 1:
type: "custom:button-card"
template: "popup_light_brightness"
entity: light.main_bedroom_dresser_lamp
# variables:
# ulm_popup_light_entity: light.main_bedroom_dresser_lamp
light 2:
type: "custom:button-card"
template: "popup_light_brightness"
entity: light.main_bedroom_bed_lightstrip
# variables:
# ulm_popup_light_entity: light.main_bedroom_bed_lightstrip
light 3:
type: "custom:button-card"
template: "popup_light_brightness"
entity: light.main_bedroom_dresser_lightstrip
# variables:
# ulm_popup_light_entity: light.main_bedroom_dresser_lightstrip
## Rooms
livingroom: !include "../views/livingroom.yaml"
main.yaml
---
type: "custom:layout-card"
layout_type: "custom:grid-layout"
layout:
# Tablet portrait
grid-template-columns: "1fr 1fr 1fr 1fr 1fr 1fr"
grid-template-areas: |
"welcome welcome welcome welcome welcome welcome"
"card1 card1 card2 card2 card3 card3"
mediaquery:
# Mobile
"(max-width: 800px)":
grid-template-columns: "1fr 1fr"
grid-template-areas: |
"welcome welcome"
"card1 card1"
"card2 card2"
"card3 card3"
view_layout:
grid-area: "main"
cards:
- view_layout:
grid-area: "welcome"
type: "custom:button-card"
template: "card_esh_welcome"
triggers_update: "input_boolean.minimalist_dropdown"
variables:
ulm_card_esh_welcome_collapse: input_boolean.minimalist_dropdown
ulm_weather: "weather.1553"
entity_1:
nav: "Livingroom"
icon: "mdi:lightbulb"
name: "Lights"
color: "yellow"
entity_2:
nav: "Livingroom"
icon: "mdi:shield"
name: Secure
color: "green"
entity_3:
nav: "Livingroom"
icon: "mdi:beaker"
name: Lab
color: "purple"
entity_4:
nav: "Livingroom"
icon: "mdi:battery-70"
name: Batteries
color: "red"
entity_5:
nav: "Livingroom"
icon: "mdi:music-circle"
name: "Music"
color: "blue"
- view_layout:
grid-area: "card1"
type: "custom:button-card"
template: "card_light"
entity: light.main_bedroom_dresser_lamp
variables:
ulm_card_light_enable_slider: true
ulm_card_light_enable_color: true
ulm_card_light_enable_popup: true
ulm_input_select_option: light 1
ulm_input_select: input_select.minimalisthelper
- view_layout:
grid-area: "card2"
type: "custom:button-card"
template: "card_light"
entity: light.main_bedroom_bed_lightstrip
variables:
ulm_card_light_enable_slider: true
ulm_card_light_enable_color: true
ulm_card_light_enable_popup: true
ulm_input_select_option: light 2
ulm_input_select: input_select.minimalisthelper
- view_layout:
grid-area: "card3"
type: "custom:button-card"
template: "card_light"
entity: light.main_bedroom_dresser_lightstrip
variables:
ulm_card_light_enable_slider: true
ulm_card_light_enable_color: true
ulm_card_light_enable_popup: true
ulm_input_select_option: light 3
ulm_input_select: input_select.minimalisthelper
adaptive-ui.yaml
---
button_card_templates: !include_dir_merge_named "../../../custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/"
title: "Control"
theme: "minimalist-desktop"
icon: "mdi:tablet-dashboard"
background: "var(--background-image)"
views:
- type: "custom:grid-layout"
title: "home"
icon: "mdi:home-outline"
path: "0"
layout:
grid-template-columns: "1fr 1fr"
grid-template-rows: "min-content"
grid-template-areas: |
"main popup"
mediaquery:
"(max-width: 1100px), (orientation: portrait)":
grid-template-columns: "100%"
grid-template-areas: "main"
cards:
- !include "views/main.yaml"
- !include "popup/popup.yaml"
- type: "custom:grid-layout"
title: "Livingroom"
icon: "mdi:sofa-single-outline"
path: "Livingroom"
layout:
grid-template-columns: "1fr 1fr"
grid-template-rows: "min-content"
grid-template-areas: |
"livingroom popup"
mediaquery:
"(max-width: 1100px), (orientation: portrait)":
grid-template-columns: "100%"
grid-template-areas: "livingroom"
cards:
- !include "views/livingroom.yaml"
- !include "popup/popup.yaml"
kdzoha
January 14, 2024, 9:15am
3603
already answered hereā¦ I suspect the same fix might work for meā¦
Hello, has anyone encountered my problem? The popup cards donāt stop on the right side of the screenā¦ I have no idea why, I followed the steps on the official page.
[ezgif.com-video-to-gif]
The dash is under construction, so I made some tests with some cards.
Here is my main yaml file
---
type: "custom:layout-card"
layout_type: "custom:grid-layout"
layout:
# Tablet portrait
grid-template-columns: "1fr 1fr 1fr 1fr 1fr 1fr"
grid-template-areas: |
"text text text weather weather weathā¦
kdzoha
January 14, 2024, 4:36pm
3604
Actually I have another questionā¦
Iāve used auto-entities quite a bit in my regular dashboard. what will be really cool is if there was a way to to also generate the switch-states that wayā¦
icon: "mdi:battery-70"
path: "batteries"
cards:
- type: "custom:button-card"
template: chip_back
variables:
ulm_chip_back_path: /ui-lovelace-minimalist/home
- type: "custom:button-card"
template: card_title
name: Batteries
- type: custom:auto-entities
card:
type: grid
columns: 1
square: false
card_param: cards
filter:
include:
- attributes:
device_class: battery
options:
type: "custom:button-card"
template: card_battery
variables:
ulm_card_battery_charger_type_entity_id: this.entity_id
ulm_card_battery_battery_level_danger: 30
ulm_card_battery_battery_level_warning: 80
sort:
method: state
numeric: True
reverse: False
ignore_case: True
it allows me to do things like this:
liminal
(Shane)
January 15, 2024, 3:27am
3605
Battery card name not working?
Am I doing something wrong here?
- type: "custom:button-card"
template: card_battery
entity: sensor.balcony_door_battery
variables:
- ulm_card_battery_charger_type_entity_id: sensor.battery_level
- ulm_card_battery_battery_level_danger: 20
- ulm_card_battery_battery_level_warning: 40
- ulm_card_battery_name: Balcony Door Battery
But I just get the name of the sensor not the firendly name?
anyone else having the same issues?
Elbad
January 15, 2024, 5:01pm
3606
Mine look the same and work. Only difference is mine donāt have ā - ā prefix.
- type: "custom:button-card"
template: card_battery
entity: sensor.study_temp_battery
variables:
ulm_card_battery_charger_type_entity_id: sensor.study_temp_battery
ulm_card_battery_battery_level_danger: 20
ulm_card_battery_battery_level_warning: 50
ulm_card_battery_name: Study Temp Battery
1 Like
Elbad
January 15, 2024, 5:12pm
3608
Has anyone gotten ulm_card_dynamic_color
to work in the card_esh_room
card?
if (variables.ulm_custom_card_esh_room_light_entity) { // always null if the light is on
var color = states[variables.ulm_custom_card_esh_room_light_entity].attributes.rgb_color;
if (states[variables.ulm_custom_card_esh_room_light_entity].state == "on") {
if (color && variables.ulm_card_dynamic_color) {
return 'rgba(' + color + ', 0.2)';
}
return 'rgba(var(--color-background-yellow), 0.2)'; // this seems to trigger anyway if the light is on
}
}
return 'var(--ha-card-background, var(--card-background-color, white))';
Iāve tried debugging and inside the template, it seems both entity
and variables.ulm_custom_card_esh_room_light_entity
are null when I console.log them, if a light is switched on. If the light is off, they seem to work fine. The card is yellow when the light is on, but for RGB lights it does not use the light color for the card background.
liminal
(Shane)
January 15, 2024, 11:39pm
3609
Beautiful! Thank you that is what it was! All working now