This is an UI Widget to control a Neato vacuum cleaner via [Neato - Bindings | openHAB].
Resources
uid: vacuum-cleaner_06bd69789f
tags:
- vacuum cleaner
props:
parameters:
- description: Set a Name for the vacuum cleaner
label: Title
name: title
required: false
type: TEXT
- context: item
description: An item for battery-level
label: Batterie-Level Item
name: batterylevel
required: false
type: TEXT
- context: item
description: An item for status
label: Current Status
name: currentstatus
required: false
type: TEXT
- context: item
description: An item for action
label: Current Action
name: currentaction
required: false
type: TEXT
- context: item
description: An item for is Docked
label: Device is Docked
name: isDocked
required: false
type: TEXT
- context: item
description: An item for Command
label: Command Item
name: cmditem
required: false
type: TEXT
- context: item
description: An item for last error
label: Last Error Item
name: lasterror
required: false
type: TEXT
parameterGroups: []
timestamp: Jan 3, 2022, 9:32:17 PM
component: f7-card
config:
style:
noShadow: false
class:
- padding: 0px
boarder-radius: var(--f7-card-expandable-board-radius)
box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.1)
height: 120px
margin-left: 5px
margin-right: 5px
slots:
content:
- component: f7-block
config:
style:
position: absolute
top: -5px
left: 16px
flex-direction: row
display: flex
slots:
default:
- component: f7-icon
config:
f7: tornado
size: 18
style:
margin-right: 10px
- component: Label
config:
text: "=props.title ? props.title : 'Vacuum Cleaner'"
style:
font-size: 12px
margin-top: 0px
- component: f7-block
config:
style:
position: absolute
top: 60px
left: 16px
flex-direction: row
display: flex
slots:
default:
- component: f7-icon
config:
f7: "=((items[props.currentstatus].state === 'IDLE') ? 'moon_zzz' : ((items[props.currentaction].state === 'HOUSE_CLEANING') ? 'play' : 'pause'))"
tooltip: '= "Status: " + items[props.currentstatus].state + " Action: " + items[props.currentaction].state'
size: 18
style:
margin-right: 5px
- component: Label
config:
text: =items[props.currentstatus].displayState
visible: false
style:
font-size: 12px
margin-top: 0px
- component: f7-icon
config:
f7: arrow_2_squarepath
size: 18
style:
margin-right: 5px
margin-left: 8px
visible: "=((items[props.currentaction].state === 'INVALID') ? false : ((items[props.currentaction].state === 'HOUSE_CLEANING') ? false : true))"
- component: Label
config:
text: =items[props.currentaction].displayState
style:
font-size: 12px
margin-top: 0px
visible: "=((items[props.currentaction].state === 'INVALID') ? false : ((items[props.currentaction].state === 'HOUSE_CLEANING') ? false : true))"
- component: f7-icon
config:
f7: square_arrow_right
size: 18
style:
margin-right: 5px
margin-left: 8px
- component: Label
config:
text: "=((items[props.isDocked].state === 'ON') ? 'im Dock' : 'nicht im Dock')"
style:
font-size: 12px
margin-top: 0px
- component: f7-icon
config:
f7: trash
size: 18
visible: "=items[props.lasterror].state === 'ui_alert_dust_bin_full' ? true : false"
style:
margin-right: 5px
margin-left: 20px
- component: f7-block
config:
style:
position: absolute
width: calc(100%)
slots:
default:
- component: f7-chip
config:
iconF7: "=((items[props.batterylevel].state > 90) ? 'battery_100' : ((items[props.batterylevel].state > 20) ? 'battery_25' : 'battery_0'))"
text: =items[props.batterylevel].state +"%"
iconSize: 16
iconColor: "=((items[props.batterylevel].state > 90) ? 'green' : ((items[props.batterylevel].state > 20) ? 'orange' : 'red'))"
textColor: "=((items[props.batterylevel].state > 90) ? 'green' : ((items[props.batterylevel].state > 20) ? 'orange' : 'red'))"
style:
--f7-chip-bg-color: rgba(255, 255, 255, 0)
font-weight: 700
position: absolute
top: 9px
right: 10px
- component: f7-block
config:
style:
position: absolute
top: 90px
left: 5px
flex-direction: row
display: flex
slots:
default:
- component: oh-button
config:
iconF7: play_circle
iconSize: 35
action: command
actionItem: =props.cmditem
actionCommand: clean
tooltip: Start Cleaning the house
visible: "=items[props.currentstatus].state === 'IDLE' ? true : false"
style:
height: 35px
background: transparent
- component: oh-button
config:
iconF7: play_circle_fill
iconSize: 35
action: command
actionItem: =props.cmditem
actionCommand: resume
visible: "=items[props.currentstatus].state === 'IDLE' ? false : true"
disabled: "=items[props.currentaction].state === 'HOUSE_CLEANING' ? false : true"
style:
height: 35px
background: transparent
- component: oh-button
config:
iconF7: pause_circle
iconSize: 35
action: command
actionItem: =props.cmditem
actionCommand: pause
tooltip: Unterbricht den Reinigungsvorgang
disabled: "=items[props.currentstatus].state === 'IDLE' ? true : false"
style:
height: 35px
background: transparent
- component: oh-button
config:
iconF7: stop_circle
iconSize: 35
action: command
actionItem: =props.cmditem
actionCommand: stop
tooltip: Stoppt den Reinigungsvorgang
disabled: "=items[props.currentstatus].state === 'IDLE' ? true : false"
style:
height: 35px
background: transparent
- component: oh-button
config:
iconF7: arrow_uturn_left_circle
iconSize: 35
action: command
actionItem: =props.cmditem
actionCommand: dock
tooltip: Der Roboter fährt zum Ausgangspunkt zurück
disabled: "=items[props.currentstatus].state === 'IDLE' ? true : false"
style:
height: 35px
background: transparent