Skip to content

Commit

Permalink
Merge pull request #1417 from UI-Lovelace-Minimalist/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
basbruss committed Nov 24, 2023
2 parents 1327816 + e8c6c3f commit 77424a7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ card_vertical_button:
return "vacuum.toggle";
if( entity.entity_id.startsWith("script.") )
return "script.toggle";
if( entity.entity_id.startsWith("button.") )
return "button.press";
// If we need to support other entities we can add these options here.
return "";
]]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,28 +283,24 @@ card_scenes_pill_welcome:
[[[
if(variables?.nav_path){
return "navigate"
} else {
return "call-service"
}
return "call-service"
]]]
service: >
[[[
if(typeof(entity) !== 'undefined' && entity !== undefined){
if(entity.entity_id.startsWith("scene.")){
return "scene.turn_on"
}
if(entity.entity_id.startsWith("media_player.")){
return "media_player.media_play_pause"
}
if(entity.entity_id.startsWith("input_select.")){
return "input_select.select_option"
}
if(entity.entity_id.startsWith("script.")){
return entity.entity_id
}
} else {
return "homeassistant.toggle"
if(entity?.entity_id.startsWith("scene.")){
return "scene.turn_on"
}
if(entity?.entity_id.startsWith("media_player.")){
return "media_player.media_play_pause"
}
if(entity?.entity_id.startsWith("input_select.")){
return "input_select.select_option"
}
if(entity?.entity_id.startsWith("script.")){
return entity.entity_id
}
return "homeassistant.toggle"
]]]
navigation_path: "[[[ return variables?.nav_path; ]]]"
service_data: |
Expand Down Expand Up @@ -374,29 +370,26 @@ card_scenes_pill_welcome:
[[[
if(variables?.nav_path){
return "navigate"
} else {
return "call-service"
}
return "call-service"
]]]
navigation_path: "[[[ return variables?.nav_path; ]]]"
service: >
[[[
if(typeof(entity) !== 'undefined' && entity !== undefined){
if(entity.entity_id.startsWith("scene.")){
return "scene.turn_on"
}
if(entity.entity_id.startsWith("media_player.")){
return "media_player.media_play_pause"
}
if(entity.entity_id.startsWith("input_select.")){
return "input_select.select_option"
}
if(entity.entity_id.startsWith("script.")){
return entity.entity_id
}
} else {
return "homeassistant.toggle"
if(entity?.entity_id.startsWith("scene.")){
return "scene.turn_on"
}
if(entity?.entity_id.startsWith("media_player.")){
return "media_player.media_play_pause"
}
if(entity?.entity_id.startsWith("input_select.")){
return "input_select.select_option"
}
if(entity?.entity_id.startsWith("script.")){
return entity.entity_id
}
return "homeassistant.toggle"
]]]
service_data: |
[[[
if (variables.service_data){
Expand Down

0 comments on commit 77424a7

Please sign in to comment.