Skip to content

Commit

Permalink
Merge pull request #1474 from tieskuh/patch-4
Browse files Browse the repository at this point in the history
Update card_vacuum.yaml - add support for lawn mower
  • Loading branch information
wilbiev authored Dec 25, 2024
2 parents 7d7e8e4 + a51240d commit fd59c79
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ card_vacuum:
var state = entity.state.toLowerCase();
var colors = {
"cleaning": "blue",
"mowing": "blue",
"paused": "green",
"mopping": "yellow",
"returning": "purple",
Expand Down Expand Up @@ -52,7 +53,7 @@ card_vacuum:
let map = "'item1' 'map' 'item2'"
if(variables.ulm_card_vacuum_camera != ""){
if(variables.ulm_card_vacuum_camera_toggle){
if(entity.state.toLowerCase() === 'cleaning' || entity.state.toLowerCase() === 'mopping'){
if(entity.state.toLowerCase() === 'cleaning' || entity.state.toLowerCase() === 'mopping' || entity.state.toLowerCase() === 'mowing'){
return map;
}
} else {
Expand All @@ -67,7 +68,7 @@ card_vacuum:
let map = "repeat(3, min-content)"
if(variables.ulm_card_vacuum_camera != ""){
if(variables.ulm_card_vacuum_camera_toggle){
if(entity.state.toLowerCase() === 'cleaning' || entity.state.toLowerCase() === 'mopping'){
if(entity.state.toLowerCase() === 'cleaning' || entity.state.toLowerCase() === 'mopping' || entity.state.toLowerCase() === 'mowing'){
return map;
}
} else {
Expand All @@ -94,7 +95,7 @@ card_vacuum:
let map = "block"
if(variables.ulm_card_vacuum_camera != ""){
if(variables.ulm_card_vacuum_camera_toggle){
if(entity.state.toLowerCase() === 'cleaning' || entity.state.toLowerCase() === 'mopping'){
if(entity.state.toLowerCase() === 'cleaning' || entity.state.toLowerCase() === 'mopping' || entity.state.toLowerCase() === 'mowing'){
return map;
}
} else {
Expand Down Expand Up @@ -249,7 +250,7 @@ card_vacuum:
]]]
state:
- operator: "template"
value: "[[[ return ['cleaning','mopping'].includes(entity.state.toLowerCase()) ]]]"
value: "[[[ return ['cleaning','mopping','mowing'].includes(entity.state.toLowerCase()) ]]]"
icon: "mdi:stop"
tap_action:
action: "perform-action"
Expand All @@ -260,7 +261,7 @@ card_vacuum:
action: "perform-action"
perform_action: >
[[[
return ['cleaning','mopping'].includes(entity.state.toLowerCase()) ? "vacuum.stop" : "vacuum.start";
return ['cleaning','mopping','mowing'].includes(entity.state.toLowerCase()) ? "vacuum.stop" : "vacuum.start";
]]]
target:
entity_id: "[[[ return entity.entity_id ]]]"
Expand Down

0 comments on commit fd59c79

Please sign in to comment.