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

Update card_vacuum.yaml - add support for lawn mower #1474

Merged
merged 2 commits into from
Dec 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading