diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml
index c3ff59423..fc7cfaeb8 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/default.yaml
@@ -43,7 +43,7 @@ ulm_translation_engine:
}
var label = hass.resources[lang]["component." + domain + ".state._." + state];
var translation = label ? label : state;
- return (entity.attributes.current_temperature ) + '°' + ' • ' + translation + (entity.state !='off' ? ' (' + mode + ')' : '');
+ return (entity.attributes.current_temperature ) + '°' + ' • ' + translation + ((entity.state !='off' && mode !== undefined) ? ' (' + mode + ')' : '');
}
]]]
ulm_translation_off: "[[[ return hass.resources[hass['language']]['state.default.off']; ]]]"
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml b/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml
index 0bc2062ad..bc8952353 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/translations/es.yaml
@@ -4,6 +4,9 @@ ulm_language_variables:
ulm_currency: "€"
ulm_updates_available: "¡Actualización disponible!"
ulm_no_updates_available: "No hay actualizaciones"
+ ulm_ophaling: "¡Recogida de basura!"
+ ulm_geen_ophaling: "Sin recogida"
+ ulm_volgende_ophaling: "Próxima recogida"
ulm_morning: "Buenos días"
ulm_afternoon: "Buenas tardes"
ulm_evening: "Buenas noches"
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_card.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_card.yaml
index e519c28d3..9c9c42d63 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_card.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_card.yaml
@@ -30,6 +30,7 @@ ulm_actions_card:
return action
]]]
+ navigation_path: "[[[ return variables.ulm_card_tap_action == 'navigate' ? variables.ulm_card_tap_navigate_path : '/0' ]]]"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
@@ -84,6 +85,7 @@ ulm_actions_card:
return action
]]]
+ navigation_path: "[[[ return variables.ulm_card_hold_action == 'navigate' ? variables.ulm_card_hold_navigate_path : '/0' ]]]"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
@@ -137,6 +139,7 @@ ulm_actions_card:
return action
]]]
+ navigation_path: "[[[ return variables.ulm_card_double_tap_action == 'navigate' ? variables.ulm_card_double_tap_navigate_path : '/0' ]]]"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_icon.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_icon.yaml
index 7356e56e7..eccbc286c 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_icon.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_icon.yaml
@@ -30,6 +30,7 @@ ulm_actions_icon:
return action
]]]
+ navigation_path: "[[[ return variables.ulm_icon_tap_action == 'navigate' ? variables.ulm_icon_tap_navigate_path : '/0' ]]]"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
@@ -84,6 +85,7 @@ ulm_actions_icon:
return action
]]]
+ navigation_path: "[[[ return variables.ulm_icon_hold_action == 'navigate' ? variables.ulm_icon_hold_navigate_path : '/0' ]]]"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
@@ -137,6 +139,7 @@ ulm_actions_icon:
return action
]]]
+ navigation_path: "[[[ return variables.ulm_icon_double_tap_action == 'navigate' ? variables.ulm_icon_double_tap_navigate_path : '/0' ]]]"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_name.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_name.yaml
index a7a91b9ee..3210625c7 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_name.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/actions/actions_name.yaml
@@ -30,6 +30,7 @@ ulm_actions_name:
return action
]]]
+ navigation_path: "[[[ return variables.ulm_name_tap_action == 'navigate' ? variables.ulm_name_tap_navigate_path : '/0' ]]]"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
@@ -84,6 +85,7 @@ ulm_actions_name:
return action
]]]
+ navigation_path: "[[[ return variables.ulm_name_hold_action == 'navigate' ? variables.ulm_name_hold_navigate_path : '/0' ]]]"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
@@ -137,6 +139,7 @@ ulm_actions_name:
return action
]]]
+ navigation_path: "[[[ return variables.ulm_name_double_tap_action == 'navigate' ? variables.ulm_name_double_tap_navigate_path : '/0' ]]]"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/2-line_cards/card_graph.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/2-line_cards/card_graph.yaml
index 96fecf981..878bc8244 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/2-line_cards/card_graph.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/2-line_cards/card_graph.yaml
@@ -39,8 +39,6 @@ card_graph:
item1:
card:
type: "custom:button-card"
- template:
- - "icon_more_info"
custom_fields:
item1:
card:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_battery.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_battery.yaml
index b34431fc6..499cfb2fc 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_battery.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_battery.yaml
@@ -20,8 +20,6 @@ card_battery:
item1:
card:
type: "custom:button-card"
- template:
- - "icon_more_info"
custom_fields:
item1:
card:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml
index 5d3fcef41..781db4a35 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor.yaml
@@ -16,7 +16,6 @@ card_binary_sensor:
card:
type: "custom:button-card"
template:
- - "icon_more_info"
- "blue"
custom_fields:
item1:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml
index b1ff4f492..01020386e 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_binary_sensor_alert.yaml
@@ -16,7 +16,6 @@ card_binary_sensor_alert:
card:
type: "custom:button-card"
template:
- - "icon_more_info"
- "blue"
custom_fields:
item1:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml
index 1981897ce..a48a2f544 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_cover.yaml
@@ -85,8 +85,6 @@ card_cover:
item1:
card:
type: "custom:button-card"
- template:
- - "icon_more_info"
custom_fields:
item1:
card:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml
index 5c66826ae..61a33675e 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic.yaml
@@ -12,8 +12,6 @@ card_generic:
item1:
card:
type: "custom:button-card"
- template:
- - "icon_more_info"
custom_fields:
item1:
card:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml
index d58aa4c63..58c80b476 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_generic_swap.yaml
@@ -12,8 +12,6 @@ card_generic_swap:
item1:
card:
type: "custom:button-card"
- template:
- - "icon_more_info"
custom_fields:
item1:
card:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_input_boolean.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_input_boolean.yaml
index 5bf07475c..32a9c4522 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_input_boolean.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_input_boolean.yaml
@@ -14,7 +14,6 @@ card_input_boolean:
card:
type: "custom:button-card"
template:
- - "icon_more_info"
- "blue"
custom_fields:
item1:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml
index 188555bcc..a5e0e5c1f 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_light.yaml
@@ -98,8 +98,6 @@ card_light:
item1:
card:
type: "custom:button-card"
- template:
- - "icon_more_info"
custom_fields:
item1:
card:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml
index ba094115a..6fafb3018 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_media_player.yaml
@@ -90,8 +90,6 @@ card_media_player:
item1:
card:
type: "custom:button-card"
- template:
- - "icon_more_info"
custom_fields:
item1:
card:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_person.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_person.yaml
index a7a602585..048127b20 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_person.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_person.yaml
@@ -22,7 +22,7 @@ card_person:
} else {
let state = states[variables.ulm_card_person_entity].state;
let option = ["home", "not_home", "unavailable", "unknown"]
- return (option.includes(state)) ? variables.ulm_translation_state : state
+ return (option.includes(state)) ? variables.ulm_translation_state : (states["zone."+state]?.attributes?.friendly_name || state)
}
]]]
name: "[[[ return states[variables.ulm_card_person_entity].attributes.friendly_name ]]]"
@@ -61,10 +61,10 @@ card_person:
notification: >
[[[
if (states[variables.ulm_card_person_entity].state !== 'home') {
- if (states[variables.ulm_card_person_entity].state === states[variables.ulm_card_person_zone1]?.attributes?.friendly_name) {
+ if (states[variables.ulm_card_person_zone1]?.attributes?.persons.includes(variables.ulm_card_person_entity)) {
var icon = states[variables.ulm_card_person_zone1].attributes.icon !== null ? states[variables.ulm_card_person_zone1].attributes.icon : 'mdi:help-circle'
return '';
- } else if (states[variables.ulm_card_person_entity].state === states[variables.ulm_card_person_zone2]?.attributes?.friendly_name) {
+ } else if (states[variables.ulm_card_person_zone2]?.attributes?.persons.includes(variables.ulm_card_person_entity)) {
var icon = states[variables.ulm_card_person_zone2].attributes.icon !== null ? states[variables.ulm_card_person_zone2].attributes.icon : 'mdi:help-circle'
return '';
} else {
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_power_outlet.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_power_outlet.yaml
index 749b6af49..695735cd3 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_power_outlet.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_power_outlet.yaml
@@ -16,7 +16,6 @@ card_power_outlet:
card:
type: "custom:button-card"
template:
- - "icon_more_info"
- "yellow"
custom_fields:
item1:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml
index ea43fb67b..18ba7b7b0 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_room.yaml
@@ -5,43 +5,32 @@ card_room:
variables:
label_use_temperature: true
label_use_brightness: false
- color: "var(--google-grey-500)"
- show_icon: true
- show_name: true
- show_label: true
- size: "45%"
double_tap_action:
action: "call-service"
service: "input_select.select_option"
service_data:
option: "[[[ return variables.ulm_input_select_option ]]]"
entity_id: "[[[ return variables.ulm_input_select ]]]"
+ color: "var(--google-grey-500)"
+ size: "45%"
aspect_ratio: "1/1"
+ show_icon: true
+ show_label: true
+ show_name: true
+ icon: "mdi:sofa-single"
label: |-
[[[
if (variables.label_use_temperature) {
- return (entity.attributes.current_temperature || entity.attributes.temperature || entity.state || '-') + (entity.attributes.unit_of_measurement || '°C');
- } else if (variables.label_use_brightness) {
- if (entity.state){
- if (entity.state == "off"){
- return variables.ulm_translation_state;
- } else if (entity.state == "on"){
- if (entity.attributes.brightness != null){
- var bri = Math.round(entity.attributes.brightness / 2.55);
- return (bri ? bri : "0") + "%";
- } else {
- return variables.ulm_translation_state;
- }
- }
- } else {
- return variables.ulm_translation_state;
- }
- } else {
- return variables.ulm_translation_state;
+ return (entity?.attributes?.current_temperature || entity?.attributes?.temperature || entity?.state || '-') + (entity?.attributes?.unit_of_measurement || '°C');
+ } else if (variables.label_use_brightness && entity?.state == "on" && entity?.attributes?.brightness != null) {
+ let bri = Math.round(entity?.attributes?.brightness / 2.55);
+ return (bri ? bri : "0") + "%";
}
+ return variables.ulm_translation_state;
]]]
state:
- - styles:
+ - value: "unavailable"
+ styles:
custom_fields:
notification:
- border-radius: "50%"
@@ -56,220 +45,182 @@ card_room:
- margin-left: "-35%"
- line-height: 0
- display: "grid"
- - background-color: >
- [[[
- return "rgba(var(--color-red),1)";
- ]]]
- value: "unavailable"
+ - background-color: "[[[ return 'rgba(var(--color-red),1)'; ]]]"
styles:
- card:
- - border-radius: "20px"
- - box-shadow: "var(--box-shadow)"
- - padding: "5px"
- grid:
- - grid-template-areas: "'n n n i1' 'l l l i2' 'i i . i3' 'i i . i4'"
- - grid-template-columns: "1fr 1fr 1fr 1fr"
- - grid-template-rows: "1fr 1fr 1fr 1fr"
- - justify-items: "center"
icon:
- color: "rgba(var(--color-theme),0.2)"
- img_cell:
- - background-color: "rgba(var(--color-theme),0.05)"
- - border-radius: "50%"
- - width: "75%"
- - height: "75%"
- - max-width: "none"
- - max-height: "none"
- - position: "absolute"
- - left: "50%"
- - top: "50%"
- - transform: "translate(-50%,-50%)"
- - margin-top: "25%"
- - margin-left: "-25%"
- name:
+ label:
- justify-self: "start"
- - align-self: "end"
+ - align-self: "start"
- font-weight: "bold"
- font-size: "14px"
+ - filter: "opacity(40%)"
- margin-left: "12px"
- - margin-bottom: "10%"
- label:
+ - max-width: "[[[ return `calc(100% - (12px + ${!variables?.entity_1 && !variables?.entity_2 ? 5 : 0}px))`; ]]]"
+ - text-overflow: "ellipsis"
+ - overflow: "hidden"
+ - margin-top: "[[[ return !variables?.entity_1 ? '-24%' : '-10%'; ]]]"
+ name:
- justify-self: "start"
- - align-self: "start"
+ - align-self: "end"
- font-weight: "bold"
- - font-size: "12px"
- - filter: "opacity(40%)"
+ - font-size: "18px"
- margin-left: "12px"
- - margin-top: "-10%"
+ - margin-bottom: "[[[ return !variables?.entity_1 ? (!variables?.entity_2 ? '15.8%' : '24%') : '10%'; ]]]"
+ - max-width: "[[[ return `calc(100% - (12px + ${!variables?.entity_2 ? 5 : 0}px))`; ]]]"
+ - text-overflow: "ellipsis"
+ - overflow: "hidden"
state:
- justify-self: "start"
- font-weight: "bold"
- font-size: "12px"
- filter: "opacity(40%)"
- margin-left: "6px"
+ img_cell:
+ - background-color: "rgba(var(--color-theme),0.05)"
+ - border-radius: "50%"
+ - width: "75%"
+ - height: "75%"
+ - max-width: "none"
+ - max-height: "none"
+ - position: "absolute"
+ - left: "50%"
+ - top: "50%"
+ - transform: "translate(-50%,-50%)"
+ - margin-top: "25%"
+ - margin-left: "-25%"
+ grid:
+ - grid-template-areas: "[[[ return !variables?.entity_1 ? (!variables?.entity_2 ? `'n n n' 'l l i3' 'i i i4'` : `'n n i2' 'l l i3' 'i i i4'`) : `'n n n i1' 'l l l i2' 'i i . i3' 'i i . i4'`; ]]]"
+ - grid-template-columns: "[[[ return !variables?.entity_1 ? '1fr 1fr 1fr' : '1fr 1fr 1fr 1fr'; ]]]"
+ - grid-template-rows: "[[[ return !variables?.entity_1 ? '1fr 1fr 1fr' : '1fr 1fr 1fr 1fr'; ]]]"
+ - justify-items: "center"
+ card:
+ - border-radius: "20px"
+ - box-shadow: "var(--box-shadow)"
+ - padding: "5px"
custom_fields:
- i1:
- - border-radius: "50%"
- - width: "80%"
- - height: "80%"
- - line-height: 0
- - display: "grid"
- i2:
- - border-radius: "50%"
- - width: "80%"
- - height: "80%"
- - line-height: 0
- - display: "grid"
- i3:
- - border-radius: "50%"
- - width: "80%"
- - height: "80%"
- - line-height: 0
- - display: "grid"
- i4:
+ i1: &widget_icon_room_styling
- border-radius: "50%"
- width: "80%"
- height: "80%"
- line-height: 0
- display: "grid"
+ i2: *widget_icon_room_styling
+ i3: *widget_icon_room_styling
+ i4: *widget_icon_room_styling
custom_fields:
notification: >
[[[
- if (entity.state =='unavailable'){
- return ``
+ if (entity?.state == 'unavailable'){
+ return '';
}
]]]
+
i1:
card:
type: "custom:button-card"
template: >
[[[
- var templates = ['widget_icon_room'];
+ let templates = [ 'widget_icon_room' ];
if (variables?.entity_1?.templates?.length) {
- return ['widget_icon_room'].concat(variables.entity_1.templates);
+ templates.push(...variables.entity_1.templates);
}
return templates;
]]]
- variables: "[[[ return variables.entity_1; ]]]"
- entity: >
- [[[
- if (variables.entity_1.entity_id) {
- return variables.entity_1.entity_id;
- }
- ]]]
+ variables: "[[[ return variables?.entity_1; ]]]"
state:
- operator: "template"
value: "[[[ return !variables.entity_1; ]]]"
styles:
card:
- display: "none"
+ entity: "[[[ return variables?.entity_1?.entity_id; ]]]"
i2:
card:
type: "custom:button-card"
template: >
[[[
- var templates = ['widget_icon_room'];
+ let templates = [ 'widget_icon_room' ];
if (variables?.entity_2?.templates?.length) {
- return ['widget_icon_room'].concat(variables.entity_2.templates);
+ templates.push(...variables.entity_2.templates);
}
return templates;
]]]
- variables: "[[[ return variables.entity_2; ]]]"
- entity: >
- [[[
- if (variables?.entity_2?.entity_id) {
- return variables.entity_2.entity_id;
- }
- ]]]
+ variables: "[[[ return variables?.entity_2; ]]]"
state:
- operator: "template"
value: "[[[ return !variables.entity_2; ]]]"
styles:
card:
- display: "none"
+ entity: "[[[ return variables?.entity_2?.entity_id; ]]]"
i3:
card:
type: "custom:button-card"
template: >
[[[
- var templates = ['widget_icon_room'];
+ let templates = [ 'widget_icon_room' ];
if (variables?.entity_3?.templates?.length) {
- return ['widget_icon_room'].concat(variables.entity_3.templates);
+ templates.push(...variables.entity_3.templates);
}
return templates;
]]]
- variables: "[[[ return variables.entity_3; ]]]"
- entity: >
- [[[
- if (variables?.entity_3?.entity_id) {
- return variables.entity_3.entity_id;
- }
- ]]]
+ variables: "[[[ return variables?.entity_3; ]]]"
state:
- operator: "template"
value: "[[[ return !variables.entity_3; ]]]"
styles:
card:
- display: "none"
+ entity: "[[[ return variables?.entity_3?.entity_id; ]]]"
+
i4:
card:
type: "custom:button-card"
template: >
[[[
- var templates = ['widget_icon_room'];
+ let templates = [ 'widget_icon_room' ];
if (variables?.entity_4?.templates?.length) {
- return ['widget_icon_room'].concat(variables.entity_4.templates);
+ templates.push(...variables.entity_4.templates);
}
return templates;
]]]
- variables: "[[[ return variables.entity_4; ]]]"
- entity: >
- [[[
- if (variables?.entity_4?.entity_id) {
- return variables.entity_4.entity_id;
- }
- ]]]
+ variables: "[[[ return variables?.entity_4; ]]]"
state:
- operator: "template"
value: "[[[ return !variables.entity_4; ]]]"
styles:
card:
- display: "none"
+ entity: "[[[ return variables?.entity_4?.entity_id; ]]]"
widget_icon_room:
variables:
tap_action:
action: "toggle"
hold_action:
- action: "none"
+ action: "more-info"
tap_action:
- action: >
- [[[ if (variables?.tap_action?.action) return variables.tap_action.action; else return 'none'; ]]]
+ action: "[[[ return variables?.tap_action?.action ? variables.tap_action.action : 'none'; ]]]"
entity: "[[[ return variables.tap_action.entity; ]]]"
navigation_path: "[[[ return variables.tap_action.navigation_path; ]]]"
url_path: "[[[ return variables.tap_action.url_path; ]]]"
service: "[[[ return variables.tap_action.service; ]]]"
service_data: "[[[ return variables.tap_action.service_data; ]]]"
hold_action:
- action: >
- [[[ if (variables?.hold_action?.action) return variables.hold_action.action; else return 'none'; ]]]
+ action: "[[[ return variables?.hold_action?.action ? variables.hold_action.action : 'none'; ]]]"
entity: "[[[ return variables.hold_action.entity; ]]]"
navigation_path: "[[[ return variables.hold_action.navigation_path; ]]]"
url_path: "[[[ return variables.hold_action.url_path; ]]]"
service: "[[[ return variables.hold_action.service; ]]]"
service_data: "[[[ return variables.hold_action.service_data; ]]]"
+ size: "15px"
+ color: "var(--google-grey)"
show_icon: true
show_name: false
styles:
- grid:
- - grid-template-areas: "'i'"
- card:
- - height: "100%"
- - box-shadow: "none"
- - padding: "0px"
- - border-radius: "50%"
icon:
- width: "50%"
- height: "50%"
@@ -278,5 +229,10 @@ widget_icon_room:
img_cell:
- border-radius: "50%"
- background-color: "rgba(var(--color-theme),0.05)"
- size: "15px"
- color: "var(--google-grey)"
+ grid:
+ - grid-template-areas: "'i'"
+ card:
+ - height: "100%"
+ - box-shadow: "none"
+ - padding: "0px"
+ - border-radius: "50%"
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml
index 3ba759dda..f4c433f77 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_thermostat.yaml
@@ -143,8 +143,6 @@ card_thermostat:
item1:
card:
type: "custom:button-card"
- template:
- - "icon_more_info"
custom_fields:
item1:
card:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vacuum.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vacuum.yaml
index 81ce86c4f..08c92502d 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vacuum.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/cards/card_vacuum.yaml
@@ -73,8 +73,6 @@ card_vacuum:
item1:
card:
type: "custom:button-card"
- template:
- - "icon_more_info"
custom_fields:
item1:
card:
diff --git a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_temperature.yaml b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_temperature.yaml
index 510c97e94..6674a83bb 100644
--- a/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_temperature.yaml
+++ b/custom_components/ui_lovelace_minimalist/lovelace/ulm_templates/card_templates/chips/chip_temperature.yaml
@@ -30,6 +30,13 @@ chip_temperature:
return temp;
}
var outside_temp = states[variables.ulm_chip_temperature_outside].state;
- var inside_temp = states[variables.ulm_chip_temperature_inside].state;
- return (icon[state] || icon["default"]) + " " + convertTemperature(outside_temp) + "° / " + convertTemperature(inside_temp) + "°" ;
+ var inside_temp = null;
+ if (variables.ulm_chip_temperature_inside) {
+ inside_temp = states[variables.ulm_chip_temperature_inside].state;
+ }
+ var label = (icon[state] || icon["default"]) + " " + convertTemperature(outside_temp) + "°";
+ if (inside_temp) {
+ label = label + " / " + convertTemperature(inside_temp) + "°";
+ }
+ return label;
]]]
diff --git a/custom_components/ui_lovelace_minimalist/translations/fr.json b/custom_components/ui_lovelace_minimalist/translations/fr.json
new file mode 100644
index 000000000..0081f8b3c
--- /dev/null
+++ b/custom_components/ui_lovelace_minimalist/translations/fr.json
@@ -0,0 +1,49 @@
+{
+ "title": "UI Lovelace Minimalist",
+ "config": {
+ "step": {
+ "user": {
+ "title": "UI Lovelace Minimalist Configuration",
+ "description": "",
+ "data": {
+ "language": "Langue",
+ "sidepanel_enabled": "Activer le tableau de bord dans la barre latérale.",
+ "sidepanel_icon": "Icône dans la barre latérale",
+ "sidepanel_title": "Titre dans la barre latérale",
+ "adaptive_ui_enabled": "Activer le tableau de bord adaptatif avec vue splittée",
+ "adaptive_ui_title": "Titre du TdB adaptatif dans la barre latérale",
+ "adaptive_ui_icon": "Icône du TdB adaptatif dans la barre latérale",
+ "theme": "Thème",
+ "include_other_cards": "Inclure les custom-cards dépendantes."
+ }
+ }
+ },
+ "abort": {
+ "single_instance_allowed": "Une seule instance UI Lovelace Minimalist est autorisée.",
+ "not_setup": "UI Lovelace Minimalist n'est pas configuré."
+ }
+ },
+ "options": {
+ "step": {
+ "user": {
+ "title": "UI Lovelace Minimalist Configuration",
+ "description": "",
+ "data": {
+ "language": "Langue",
+ "sidepanel_enabled": "Activer le tableau de bord dans la barre latérale.",
+ "sidepanel_icon": "Icône dans la barre latérale",
+ "sidepanel_title": "Titre dans la barre latérale",
+ "adaptive_ui_enabled": "Activer le tableau de bord adaptatif avec vue splittée",
+ "adaptive_ui_title": "Titre du TdB adaptatif dans la barre latérale",
+ "adaptive_ui_icon": "Icône du TdB adaptatif dans la barre latérale",
+ "theme": "Thème",
+ "include_other_cards": "Inclure les custom-cards dépendantes."
+ }
+ }
+ },
+ "abort": {
+ "single_instance_allowed": "Une seule instance UI Lovelace Minimalist est autorisée.",
+ "not_setup": "UI Lovelace Minimalist n'est pas configuré."
+ }
+ }
+}
diff --git a/docs/assets/img/ulm_cards/room-card.png b/docs/assets/img/ulm_cards/room-card.png
index 39cdcf18f..ab8646a9e 100644
Binary files a/docs/assets/img/ulm_cards/room-card.png and b/docs/assets/img/ulm_cards/room-card.png differ
diff --git a/docs/setup/custom_actions.md b/docs/setup/custom_actions.md
index 7f19aabe0..b83be0c31 100644
--- a/docs/setup/custom_actions.md
+++ b/docs/setup/custom_actions.md
@@ -37,12 +37,51 @@ Possible values for each variables are :
| more-info | Display more-info window |
| popup | Display UI LOVELACE MINIMALIST popup if available and enabled on card (if not `more-info` action is used) |
| adaptive | Switch UI LOVELACE MINIMALIST popup on adaptive dashboard
if current dashboard is adaptive (if not `popup` action is used) |
+| navigate | Navigate to an other UI LOVELACE MINIMALIST view. Need additionnal variable (see below) |
!!! tip "Reloading"
Once you have edited `custom_actions.yaml` file, you must reload `"UI LOVELACE MINIMALIST"` configuration.
Just go to `"Configuration" --> "Settings"` in Home Assistant and press the `"UI_LOVELACE_MINIMALIST"` button within the "YAML configuration reloading" section.
+## Navigate action
+
+To define the path of `navigate` action, add one of the following depending on your action :
+
+- ulm_card_tap_navigate_path
+- ulm_card_hold_navigate_path
+- ulm_card_double_tap_navigate_path
+- ulm_icon_tap_navigate_path
+- ulm_icon_hold_navigate_path
+- ulm_icon_double_tap_navigate_path
+- ulm_name_tap_navigate_path
+- ulm_name_hold_navigate_path
+- ulm_name_double_tap_navigate_path
+
+```yaml
+- type: "custom:button-card"
+ template: "card_cover"
+ entity: "cover.somfy_portail"
+ variables:
+ ulm_name_hold_action: "navigate"
+ ulm_name_hold_navigate_path: "/adaptive-dash/Livingroom"
+
+```
+
+## Overwrite custom actions
+
+When creating a dashboard, custom actions can be overwritten on your card definition.
+For example, this code will overwrite the tap action on card with `more-info` action :
+
+```yaml
+- type: "custom:button-card"
+ template: "card_cover"
+ entity: "cover.somfy_portail"
+ variables:
+ ulm_card_tap_action: "more-info"
+
+```
+
## For developers
To enable action customization on your custom cards, use the following templates `icon_more_info_new` and `ulm_actions_card`
diff --git a/docs/usage/cards/card_room.md b/docs/usage/cards/card_room.md
index 111ab2d50..424ff1bd6 100644
--- a/docs/usage/cards/card_room.md
+++ b/docs/usage/cards/card_room.md
@@ -10,7 +10,7 @@ hide:
![Image title](../../assets/img/ulm_cards/room-card.png){ width="500" }
This is the `room-card`, used to show the state of single room in a quick glance.
-The card has support for 4 subicons at the right side of the card. These can be configured using custom colors and tap actions.
+The card has support for up to 4 subicons at the right side of the card. These can be configured using custom colors and tap actions.
## Variables
@@ -33,7 +33,7 @@ The card has support for 4 subicons at the right side of the card. These can be
| Variable | Default | Required | Notes | Requirement |
|----------------------------------------|-----------------|------------------|----------------|-------------|
-| entity_id | | :material-check: | The entity_id of the status icon | |
+| entity_id | | :material-close: | The entity_id of the status icon | |
| templates | | :material-close: | List of the additional button card templates to apply to this icon | |
| tap_action | | :material-close: | tap_action for the icon (see button card documentation for options) | |
| hold_action | | :material-close: | tap_action for the icon (see button card documentation for options) | |
diff --git a/docs/usage/chips/chip_temperature.md b/docs/usage/chips/chip_temperature.md
index 1630158bc..5a175482f 100644
--- a/docs/usage/chips/chip_temperature.md
+++ b/docs/usage/chips/chip_temperature.md
@@ -9,14 +9,14 @@ hide:
![example-image](../../assets/img/ulm_chips/chip_temperature.png){ width="500" }
-This `chip` is to display a weather icon together with the outside and inside temperature.
+This `chip` is to display a weather icon together with the outside and inside temperature, where the latter is optional.
## Variables
| Variable | Default | Required | Notes |
|----------|---------|------------------|-------------------|
| ulm_chip_temperature_outside | | :material-check: | This is the sensor that provides your outside temperature. If you want to use eg. a temperature value from your weather provider, you'd need to setup a template sensor first. The state of this sensor should represent a numeric value (°C or °F doesn't matter). |
-|ulm_chip_temperature_inside| | :material-check: | This is the sensor that provides your inside temperature. The state of this sensor should represent a numeric value (°C or °F doesn't matter). |
+|ulm_chip_temperature_inside| | :material-close: | This is the sensor that provides your inside temperature. The state of this sensor should represent a numeric value (°C or °F doesn't matter). |
|ulm_chip_temperature_weather| | :material-check: | This is the sensor for your weather entity for showing current weather conditions|
## Usage