Skip to content

Commit

Permalink
Merge pull request #1571 from UI-Lovelace-Minimalist/wilbie-fix-cards
Browse files Browse the repository at this point in the history
Wilbie fix cards
  • Loading branch information
wilbiev authored Dec 23, 2024
2 parents e25ac7c + e42d143 commit c8e2e91
Show file tree
Hide file tree
Showing 33 changed files with 383 additions and 346 deletions.
14 changes: 8 additions & 6 deletions custom_cards/custom_card_alarm_time/card_alarm_time.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,11 @@ card_alarm_time:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "input_datetime.set_datetime"
service_data:
action: "perform-action"
perform_action: "input_datetime.set_datetime"
target:
entity_id: "[[[ return variables.ulm_card_alarm_time_datetime ]]]"
data:
time: >
[[[
var timestamp = states[variables.ulm_card_alarm_time_datetime].attributes.timestamp;
Expand Down Expand Up @@ -259,10 +260,11 @@ card_alarm_time:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "input_datetime.set_datetime"
service_data:
action: "perform-action"
perform_action: "input_datetime.set_datetime"
target:
entity_id: "[[[ return variables.ulm_card_alarm_time_datetime ]]]"
data:
time: >
[[[
var timestamp = states[variables.ulm_card_alarm_time_datetime].attributes.timestamp;
Expand Down
18 changes: 9 additions & 9 deletions custom_cards/custom_card_chromecast/custom_card_chromecast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ card_media_player_chromecast_with_controls:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "media_player.toggle"
service_data:
action: "perform-action"
perform_action: "media_player.toggle"
target:
entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
icon: "mdi:power"
item2:
Expand All @@ -60,9 +60,9 @@ card_media_player_chromecast_with_controls:
template: "widget_icon"
entity: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
tap_action:
action: "call-service"
service: "media_player.media_play_pause"
service_data:
action: "perform-action"
perform_action: "media_player.media_play_pause"
target:
entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
icon: "mdi:pause"
state:
Expand All @@ -75,9 +75,9 @@ card_media_player_chromecast_with_controls:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "media_player.toggle"
service_data:
action: "perform-action"
perform_action: "media_player.toggle"
target:
entity_id: "[[[ return variables.ulm_card_media_player_with_controls_entity ]]]"
icon: "mdi:video-input-hdmi"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ custom_card_eraycetinay_elapsed_time:
let text = '';
if(entity.attributes.has_date) {
text += days > 0 ? days + ' ' + (days > 1 ? variables.custom_card_eraycetinay_elapsed_time_days : variables.custom_card_eraycetinay_elapsed_time_day) +' ' : '';
text += days > 0 ? days + ' ' + (days > 1 ? variables.ulm_custom_card_eraycetinay_elapsed_time_days : variables.ulm_custom_card_eraycetinay_elapsed_time_day) +' ' : '';
}
if(entity.attributes.has_time) {
text += hours > 0 ? hours + ' ' + (hours > 1 ? variables.custom_card_eraycetinay_elapsed_time_hours : variables.custom_card_eraycetinay_elapsed_time_hour) +' ' : '';
text += hours > 0 ? hours + ' ' + (hours > 1 ? variables.ulm_custom_card_eraycetinay_elapsed_time_hours : variables.ulm_custom_card_eraycetinay_elapsed_time_hour) +' ' : '';
}
if(entity.attributes.has_time && !entity.attributes.has_date) {
text += minutes > 0 ? minutes + ' ' + (minutes > 1 ? variables.custom_card_eraycetinay_elapsed_time_minutes : variables.custom_card_eraycetinay_elapsed_time_minute) +' ' : '';
text += minutes > 0 ? minutes + ' ' + (minutes > 1 ? variables.ulm_custom_card_eraycetinay_elapsed_time_minutes : variables.ulm_custom_card_eraycetinay_elapsed_time_minute) +' ' : '';
}
text = text.length ? text += variables.custom_card_eraycetinay_elapsed_time_ago : variables.custom_card_eraycetinay_elapsed_time_justnow;
text = text.length ? text += variables.ulm_custom_card_eraycetinay_elapsed_time_ago : variables.ulm_custom_card_eraycetinay_elapsed_time_justnow;
return text;
]]]
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
ulm_custom_card_eraycetinay_elapsed_time_language_variables:
variables:
custom_card_eraycetinay_elapsed_time_day: "Tag"
custom_card_eraycetinay_elapsed_time_days: "Tage"
custom_card_eraycetinay_elapsed_time_hour: "Stunde"
custom_card_eraycetinay_elapsed_time_hours: "Stunden"
custom_card_eraycetinay_elapsed_time_minute: "Minute"
custom_card_eraycetinay_elapsed_time_minutes: "Minuten"
custom_card_eraycetinay_elapsed_time_ago: "her"
custom_card_eraycetinay_elapsed_time_justnow: "Jetzt"
ulm_custom_card_eraycetinay_elapsed_time_day: "Tag"
ulm_custom_card_eraycetinay_elapsed_time_days: "Tage"
ulm_custom_card_eraycetinay_elapsed_time_hour: "Stunde"
ulm_custom_card_eraycetinay_elapsed_time_hours: "Stunden"
ulm_custom_card_eraycetinay_elapsed_time_minute: "Minute"
ulm_custom_card_eraycetinay_elapsed_time_minutes: "Minuten"
ulm_custom_card_eraycetinay_elapsed_time_ago: "her"
ulm_custom_card_eraycetinay_elapsed_time_justnow: "Jetzt"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
ulm_custom_card_eraycetinay_elapsed_time_language_variables:
variables:
custom_card_eraycetinay_elapsed_time_day: "day"
custom_card_eraycetinay_elapsed_time_days: "days"
custom_card_eraycetinay_elapsed_time_hour: "hour"
custom_card_eraycetinay_elapsed_time_hours: "hours"
custom_card_eraycetinay_elapsed_time_minute: "minute"
custom_card_eraycetinay_elapsed_time_minutes: "minutes"
custom_card_eraycetinay_elapsed_time_ago: "ago"
custom_card_eraycetinay_elapsed_time_justnow: "just now"
ulm_custom_card_eraycetinay_elapsed_time_day: "day"
ulm_custom_card_eraycetinay_elapsed_time_days: "days"
ulm_custom_card_eraycetinay_elapsed_time_hour: "hour"
ulm_custom_card_eraycetinay_elapsed_time_hours: "hours"
ulm_custom_card_eraycetinay_elapsed_time_minute: "minute"
ulm_custom_card_eraycetinay_elapsed_time_minutes: "minutes"
ulm_custom_card_eraycetinay_elapsed_time_ago: "ago"
ulm_custom_card_eraycetinay_elapsed_time_justnow: "just now"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
ulm_custom_card_eraycetinay_elapsed_time_language_variables:
variables:
custom_card_eraycetinay_elapsed_time_day: "día"
custom_card_eraycetinay_elapsed_time_days: "días"
custom_card_eraycetinay_elapsed_time_hour: "hora"
custom_card_eraycetinay_elapsed_time_hours: "horas"
custom_card_eraycetinay_elapsed_time_minute: "minuto"
custom_card_eraycetinay_elapsed_time_minutes: "minutos"
custom_card_eraycetinay_elapsed_time_ago: "atrás"
custom_card_eraycetinay_elapsed_time_justnow: "justo ahora"
ulm_custom_card_eraycetinay_elapsed_time_day: "día"
ulm_custom_card_eraycetinay_elapsed_time_days: "días"
ulm_custom_card_eraycetinay_elapsed_time_hour: "hora"
ulm_custom_card_eraycetinay_elapsed_time_hours: "horas"
ulm_custom_card_eraycetinay_elapsed_time_minute: "minuto"
ulm_custom_card_eraycetinay_elapsed_time_minutes: "minutos"
ulm_custom_card_eraycetinay_elapsed_time_ago: "atrás"
ulm_custom_card_eraycetinay_elapsed_time_justnow: "justo ahora"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
ulm_custom_card_eraycetinay_elapsed_time_language_variables:
variables:
custom_card_eraycetinay_elapsed_time_day: "nappal"
custom_card_eraycetinay_elapsed_time_days: "nappal"
custom_card_eraycetinay_elapsed_time_hour: "órával"
custom_card_eraycetinay_elapsed_time_hours: "órával"
custom_card_eraycetinay_elapsed_time_minute: "perccel"
custom_card_eraycetinay_elapsed_time_minutes: "perccel"
custom_card_eraycetinay_elapsed_time_ago: "ezelőtt"
custom_card_eraycetinay_elapsed_time_justnow: "éppen most"
ulm_custom_card_eraycetinay_elapsed_time_day: "nappal"
ulm_custom_card_eraycetinay_elapsed_time_days: "nappal"
ulm_custom_card_eraycetinay_elapsed_time_hour: "órával"
ulm_custom_card_eraycetinay_elapsed_time_hours: "órával"
ulm_custom_card_eraycetinay_elapsed_time_minute: "perccel"
ulm_custom_card_eraycetinay_elapsed_time_minutes: "perccel"
ulm_custom_card_eraycetinay_elapsed_time_ago: "ezelőtt"
ulm_custom_card_eraycetinay_elapsed_time_justnow: "éppen most"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
ulm_custom_card_eraycetinay_elapsed_time_language_variables:
variables:
custom_card_eraycetinay_elapsed_time_day: "dzień"
custom_card_eraycetinay_elapsed_time_days: "dni"
custom_card_eraycetinay_elapsed_time_hour: "godzinę"
custom_card_eraycetinay_elapsed_time_hours: "godzin"
custom_card_eraycetinay_elapsed_time_minute: "minutę"
custom_card_eraycetinay_elapsed_time_minutes: "minut"
custom_card_eraycetinay_elapsed_time_ago: "temu"
custom_card_eraycetinay_elapsed_time_justnow: "przed chwilą"
ulm_custom_card_eraycetinay_elapsed_time_day: "dzień"
ulm_custom_card_eraycetinay_elapsed_time_days: "dni"
ulm_custom_card_eraycetinay_elapsed_time_hour: "godzinę"
ulm_custom_card_eraycetinay_elapsed_time_hours: "godzin"
ulm_custom_card_eraycetinay_elapsed_time_minute: "minutę"
ulm_custom_card_eraycetinay_elapsed_time_minutes: "minut"
ulm_custom_card_eraycetinay_elapsed_time_ago: "temu"
ulm_custom_card_eraycetinay_elapsed_time_justnow: "przed chwilą"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
ulm_custom_card_eraycetinay_elapsed_time_language_variables:
variables:
custom_card_eraycetinay_elapsed_time_day: "gün"
custom_card_eraycetinay_elapsed_time_days: "gün"
custom_card_eraycetinay_elapsed_time_hour: "saat"
custom_card_eraycetinay_elapsed_time_hours: "saat"
custom_card_eraycetinay_elapsed_time_minute: "dakika"
custom_card_eraycetinay_elapsed_time_minutes: "dakika"
custom_card_eraycetinay_elapsed_time_ago: "önce"
custom_card_eraycetinay_elapsed_time_justnow: "az önce"
ulm_custom_card_eraycetinay_elapsed_time_day: "gün"
ulm_custom_card_eraycetinay_elapsed_time_days: "gün"
ulm_custom_card_eraycetinay_elapsed_time_hour: "saat"
ulm_custom_card_eraycetinay_elapsed_time_hours: "saat"
ulm_custom_card_eraycetinay_elapsed_time_minute: "dakika"
ulm_custom_card_eraycetinay_elapsed_time_minutes: "dakika"
ulm_custom_card_eraycetinay_elapsed_time_ago: "önce"
ulm_custom_card_eraycetinay_elapsed_time_justnow: "az önce"
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ custom_card_eraycetinay_lock:
ulm_custom_card_eraycetinay_lock_battery_warning_low: 5
ulm_custom_card_eraycetinay_lock_battery_sensor_binary: false
ulm_custom_card_eraycetinay_lock_battery_sensor_binary_low_state: "on"
ulm_custom_card_eraycetinay_lock_only_open: false
tap_action:
action: |
[[[
return variables.ulm_custom_card_eraycetinay_lock_tap_control ? "call-service" : "more-info";
return variables.ulm_custom_card_eraycetinay_lock_tap_control ? "perform-action" : "more-info";
]]]
# only related with call-service action
service: |
# only related with perform-action
perform_action: |
[[[
if(variables.ulm_custom_card_eraycetinay_lock_tap_control){
if(variables.ulm_custom_card_eraycetinay_lock_open){
if(variables.ulm_custom_card_eraycetinay_lock_only_open){
return "lock.open";
} else {
if (entity.state == "locked"){
Expand All @@ -29,8 +30,8 @@ custom_card_eraycetinay_lock:
}
}
]]]
# only related with call-service action
service_data:
# only related with perform-action
target:
entity_id: |
[[[ return entity.entity_id; ]]]
show_label: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ card_esh_welcome_topbar:
type: "custom:button-card"
template: "chips"
tap_action:
action: "call-service"
service: "input_boolean.toggle"
service_data:
action: "perform-action"
perform_action: "input_boolean.toggle"
target:
entity_id: "[[[ return variables.ulm_card_esh_welcome_collapse ]]]"
show_icon: true
icon: "mdi:chevron-up"
Expand Down
28 changes: 16 additions & 12 deletions custom_cards/custom_card_haven_washer/custom_card_haven_washer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,11 @@ custom_card_haven_washer:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "input_datetime.set_datetime"
service_data:
action: "perform-action"
perform_action: "input_datetime.set_datetime"
target:
entity_id: "[[[ return variables.ulm_custom_card_washer_delayed_starttime; ]]]"
data:
time: >
[[[
if (!!variables.ulm_custom_card_washer_delayed_starttime
Expand Down Expand Up @@ -597,10 +598,11 @@ custom_card_haven_washer:
type: "custom:button-card"
template: "custom_card_haven_washer_delayed_text"
tap_action:
action: "call-service"
service: "input_datetime.set_datetime"
service_data:
action: "perform-action"
perform_action: "input_datetime.set_datetime"
target:
entity_id: "[[[ return variables.ulm_custom_card_washer_delayed_starttime; ]]]"
data:
time: >
[[[
if (!!variables.ulm_custom_card_washer_delayed_starttime
Expand All @@ -624,10 +626,11 @@ custom_card_haven_washer:
}
]]]
hold_action:
action: "call-service"
service: "input_datetime.set_datetime"
service_data:
action: "perform-action"
perform_action: "input_datetime.set_datetime"
target:
entity_id: "[[[ variables.ulm_custom_card_washer_delayed_starttime ]]]"
data:
time: >
[[[
if (!!variables.ulm_custom_card_washer_delayed_starttime
Expand Down Expand Up @@ -656,10 +659,11 @@ custom_card_haven_washer:
type: "custom:button-card"
template: "widget_icon"
tap_action:
action: "call-service"
service: "input_datetime.set_datetime"
service_data:
action: "perform-action"
perform_action: "input_datetime.set_datetime"
target:
entity_id: "[[[ return variables.ulm_custom_card_washer_delayed_starttime ]]]"
data:
time: >
[[[
if (!!variables.ulm_custom_card_washer_delayed_starttime
Expand Down
Loading

0 comments on commit c8e2e91

Please sign in to comment.