I would really use your help.
first time trying minimalist and wanted to set up the adaptive UI.
I managed to have the buttons work but the adaptive part drops out of frame.
see the problem in this video - Screen Recording 2023-05-29 at 15.47.49
I would really use your help.
first time trying minimalist and wanted to set up the adaptive UI.
I managed to have the buttons work but the adaptive part drops out of frame.
see the problem in this video - Screen Recording 2023-05-29 at 15.47.49
I guess you have not fulfilled the requirements as posted in the documentation.
So please check the installed version of state-switch
@Trilis29 Without seeing or knowing you configuration for the card it’s a blind guess. Could you please give some more information so others can notice and help you with the problem
Here is the configuration:
- type: "custom:button-card"
template:
- card_room
- red_no_state
name: Bathroom
entity: light.bathroom
icon: mdi:shower-head
tap_action:
action: navigate
navigation_path: "/ui-lovelace-minimalist/bathroom"
variables:
label_use_temperature: false
label_use_brightness: true
entity_1:
entity_id: light.bathroom
templates:
- yellow_on
tap_action:
action: toggle
entity_2:
entity_id: binary_sensor.badkamer_motion_sensor
templates:
- blue_on
tap_action:
action: none
entity_3:
entity_id: input_boolean.badkamer_motionsensor_enabled
templates:
- green_on
- red_off
tap_action:
action: toggle
entity_4:
entity_id: input_boolean.bath_mode
templates:
- pink_on
tap_action:
action: toggle
No, I’m on 1.9.3
check it before posting
Just noticed by comparing the documentation with your code snippet that you literally copied the full configuration code. That will by any means not work. You will need to always adjust entities to your own existing entities.
Basically the entities in the snippet do not exist on your system ,and therefore it does not show an icon and color nor can it perform any action
does anyone have any idea how I can use {{ relative_time(states.scene.test.last_changed) }}
in my card template i’m making for label.
tried: label: "[[[ return relative_time(entity.last_changed) ]]]"
Does anybody have any experience with using Apple TV with the Media Player Card?
Mostly thinking about getting the volume controls to work using the integrated commands in HA: Apple TV - Home Assistant
new here, and still learning, I have added door and motion status to the room card, can control colour of sensor on.
Could I get some help with some CSS? I grabbed the chevron and some of the code from the welcome card and merged it with another custom card (paddy welcome card). However I’m having trouble aligning the chevron to the top of the card. Any idea what css parameter works to address this?
I think the relevant bits of the code is here:
styles:
grid:
- grid-template-areas: >
[[[
if(variables.ulm_card_welcome_scenes_collapse && states[variables.ulm_card_welcome_scenes_collapse].state == 'on'){
return "\'item1 item3\' \'item2 item2\' " ;
} else {
return "\'item1 item3\' \'item2 item2\' \'item4 item4\' " ;
}
]]]
# - grid-template-areas: "'item1 item3' 'item2 item2' 'item4 item4'"
- grid-template-columns: "9fr 1fr"
- grid-template-rows: "1fr min-content min-content"
- row-gap: "0px"
custom_fields:
item4:
- display: >
[[[
if(variables.ulm_card_welcome_scenes_collapse && states[variables.ulm_card_welcome_scenes_collapse].state == 'on'){
return "none";
} else {
return "block";
}
]]]
custom_fields:
item3:
card:
type: "custom:button-card"
template: "chips"
entity: "[[[ return variables.ulm_card_welcome_scenes_collapse ]]]"
icon: "mdi:chevron-up"
show_icon: true
styles:
grid:
- grid-template-areas: "'i'"
card:
- box-shadow: >
[[[
if (hass.themes.darkMode){
return "0px 2px 4px 0px rgba(0,0,0,0.80)";
} else {
return "var(--box-shadow)";
}
]]]
state:
- value: "on"
icon: "mdi:chevron-down"
styles:
icon:
- color: "rgb(var(--color-theme))"
tap_action:
action: "call-service"
service: "input_boolean.toggle"
service_data:
entity_id: "[[[ return variables.ulm_card_welcome_scenes_collapse ]]]
put wrong code…
- type: "custom:button-card"
template:
- card_room
- red_no_state
icon: "mdi:lightbulb"
name: "Kitchen"
variables:
label_use_temperature: true
label_use_brightness: true
entity_1:
entity: light.virtuves_led
icon: "mdi:lightbulb"
show_icon: true
templates:
- yellow_on
tap_action:
action: toggle
entity_2:
entity: light.virtuves_sala
icon: "mdi:lightbulb"
show_icon: true
templates:
- yellow_on
tap_action:
action: toggle
putting correct entities gives same result
If I press there is highlight…
can any one explain how to added custom color templates i see them in /config/custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/card_templates/colors
but. I don’t see where to add my own that will not get deleted on an update etc. like we can do for custom cards /config/ui_lovelace_minimalist/custom_cards
.
Just handle your own color templates as you would do with custom cards. As all cards are nothing more than templates for custom button-card
ah, cool thanks, so just create a folder called colors i the custom-cards
folder and put my yaml files in there, got it, THANKS
Just look a bit better at the documentation and examples on the wiki. Than you will notice you have added variables that do not exist and made some minor mistakes in the variable key for the entity
.
entity_1:
entity: light.virtuves_led
.....
Should be:
entity_1:
entity_id: light.virtuves_led
.....
Full working code:
- type: "custom:button-card"
template:
- card_room
- red_no_state
icon: "mdi:lightbulb"
name: "Kitchen"
variables:
label_use_temperature: true
label_use_brightness: true
entity_1:
entity_id: light.virtuves_led
icon: "mdi:lightbulb"
templates:
- yellow_on
tap_action:
action: toggle
entity_2:
entity_id: light.virtuves_sala
icon: "mdi:lightbulb"
templates:
- yellow_on
tap_action:
action: toggle
Hallo Andy.
Very interesting!
Can you share the code?
Thanks in advance,
Stefano
sure here you go download, in sample below I use my custom defused colours (supplied in zip), so icon blends in with background, but you can obviously use any color template
variables:
sensor_1:
entity_id: binary_sensor.back_door
templates:
- red_off_defused
- red_on_defused
room sample code, you can add up to 4 sensors, and tapping on them will popup the more-info on the sensor
- type: "custom:button-card"
template:
- custom_card_andyblac_room
- red_no_state
name: Kitchen
icon: mdi:silverware-fork-knife
label: '[[[ return states["sensor.kitchen_motion_sensor_device_temperature"].state + "°C" ]]]'
tap_action:
action: navigate
navigation_path: "kitchen"
variables:
sensor_1:
entity_id: binary_sensor.back_door
templates:
- red_off_defused
- red_on_defused
sensor_2:
entity_id: binary_sensor.kitchen_motion_sensor_occupancy
templates:
- red_off_defused
- red_on_defused
entity_1:
entity_id: null
entity_2:
entity_id: light.kitchen_lights
templates:
- yellow_on
tap_action:
action: toggle
entity_3:
entity_id: light.kitchen_cabinets
templates:
- yellow_on
tap_action:
action: toggle
entity_4:
entity_id: light.kitchen_floor_led
templates:
- yellow_on
tap_action:
action: toggle
If people like it, let me know if I should submit it to repository.
Many many thanks!
I’ll try it ASAP!
Does anyone how to use State styles with binary sensors, by that i mean we can use
yellow_on:
state:
- styles:
icon:
- color: "rgba(var(--color-yellow),1)"
label:
- color: "rgba(var(--color-yellow-text),1)"
name:
- color: "rgba(var(--color-yellow-text),1)"
img_cell:
- background-color: "rgba(var(--color-yellow), 0.2)"
id: "on"
value: "on"
and it checks state for ‘on’, but how would i use on sensor with > 0 state.