Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #1417

Merged
merged 9 commits into from
Nov 24, 2023
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
Loading