ui-lovelace.yaml
- icon: mdi:robot-vacuum
id: vacuum
title: Robika
cards:
- type: vertical-stack
cards:
- type: picture-elements
image: /local/house/vacuum_card.jpg
elements:
- type: icon
icon: mdi:bell-ring
tap_action: call-service
entity: vacuum.xiaomi_vacuum_cleaner
service: vacuum.locate
style:
top: 90%
left: 65%
"--paper-item-icon-color": rgb(115, 122, 130)
- type: icon
tap_action: call-service
icon: mdi:home
entity: vacuum.xiaomi_vacuum_cleaner
service: vacuum.return_to_base
style:
top: 90%
left: 55%
"--paper-item-icon-color": rgb(115, 122, 130)
- type: icon
icon: mdi:play
tap_action: call-service
entity: vacuum.xiaomi_vacuum_cleaner
service: vacuum.start
style:
top: 90%
left: 45%
"--paper-item-icon-color": rgb(115, 122, 130)
- type: icon
icon: mdi:stop
tap_action: call-service
entity: vacuum.xiaomi_vacuum_cleaner
service: vacuum.stop
style:
top: 90%
left: 35%
"--paper-item-icon-color": rgb(115, 122, 130)
- type: state-label
entity: sensor.vacuum_operation
style:
top: 10%
left: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-color: rgb(34, 154, 210)
background-color: rgb(54, 65, 78)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_accessories
style:
top: 10%
right: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-color: rgb(34, 154, 210)
background-color: rgb(54, 65, 78)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_main_brush
style:
top: 30%
right: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-right-style: solid
border-color: rgb(34, 154, 210)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_side_brush
style:
top: 45%
right: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-right-style: solid
border-color: rgb(34, 154, 210)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_filter
style:
top: 60%
right: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-right-style: solid
border-color: rgb(34, 154, 210)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_sensor
style:
top: 75%
right: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-right-style: solid
border-color: rgb(34, 154, 210)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_status
style:
top: 30%
left: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-left-style: solid
border-color: rgb(34, 154, 210)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_battery
style:
top: 45%
left: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-left-style: solid
border-color: rgb(34, 154, 210)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_weekdays
style:
top: 75%
left: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-left-style: solid
border-color: rgb(34, 154, 210)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_weekend
style:
top: 60%
left: 1%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-left-style: solid
border-color: rgb(34, 154, 210)
opacity: 0.8
- type: image
entity: automation.takaritas_utemezese_hetkoznap
tap_action: toggle
image: /local/house/timer-off.png
state_image:
'on': /local/house/timer.png
state_filter:
'on': brightness(200%) saturate(1.8)
'off': brightness(80%) saturate(0.8)
style:
top: 75%
left: 25%
- type: image
entity: automation.takaritas_utemezese_hetvegen
tap_action: toggle
image: /local/house/timer-off.png
state_image:
'on': /local/house/timer.png
state_filter:
'on': brightness(200%) saturate(1.8)
'off': brightness(80%) saturate(0.8)
style:
top: 60%
left: 22%
- type: conditional
conditions:
- entity: automation.takaritas_utemezese_hetkoznap
state: "on"
card:
type: entities
entities:
- sensor.vacuum_start_time_weekdays
- input_number.vacuum_start_hour_weekdays
- input_number.vacuum_start_minutes_weekdays
- type: conditional
conditions:
- entity: automation.takaritas_utemezese_hetvegen
state: "on"
card:
type: entities
entities:
- sensor.vacuum_start_time_weekend
- input_number.vacuum_start_hour_weekend
- input_number.vacuum_start_minutes_weekend
sensor.yaml
- platform: template
sensors:
vacuum_start_time_weekdays:
friendly_name: 'Takarítás indítási idő (Hétköznap)'
value_template: '{{ "%0.02d:%0.02d" | format(states("input_number.vacuum_start_hour_weekdays") | int, states("input_number.vacuum_start_minutes_weekdays") | int) }}'
vacuum_start_time_weekend:
friendly_name: 'Takarítás indítási idő (Hétvége)'
value_template: '{{ "%0.02d:%0.02d" | format(states("input_number.vacuum_start_hour_weekend") | int, states("input_number.vacuum_start_minutes_weekend") | int) }}'
vacuum_status:
friendly_name: "Vacuum - Status"
value_template: "Állapot: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.status }}"
vacuum_weekdays:
friendly_name: "Vacuum - Weekdays"
value_template: "Hétköznap:"
vacuum_weekend:
friendly_name: "Vacuum - Weekend"
value_template: "Hétvége:"
vacuum_battery:
friendly_name: "Vacuum - Battery"
value_template: "Akku: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.battery_level }}"
device_class: battery
unit_of_measurement: '%'
vacuum_accessories:
friendly_name: "Vacuum - Kellékek"
value_template: "KELLÉKEK ÁLLAPOTA"
vacuum_operation:
friendly_name: "Vacuum - Üzemelés"
value_template: "ÜZEMELÉS"
vacuum_main_brush:
friendly_name: "Vacuum - Fő kefe"
value_template: "Fő kefe: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.main_brush_left }} h"
vacuum_side_brush:
friendly_name: "Vacuum - Első kefe"
value_template: "Első kefe: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.side_brush_left }} h"
vacuum_filter:
friendly_name: "Vacuum - Filter"
value_template: "Filter: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.filter_left }} h"
vacuum_sensor:
friendly_name: "Vacuum - Szenzorok"
value_template: "Szenzorok: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.sensor_dirty_left }} h"
input_slider.yaml
vacuum_start_minutes_weekend:
name: Indítási perc
initial: 0
min: 0
max: 59
step: 1
mode: slider
vacuum_start_hour_weekend:
name: Indítási óra
initial: 13
min: 0
max: 23
step: 1
mode: slider
vacuum_start_minutes_weekdays:
name: Indítási perc
initial: 0
min: 0
max: 59
step: 1
mode: slider
vacuum_start_hour_weekdays:
name: Indítási óra
initial: 15
min: 0
max: 23
step: 1
mode: slider
automations.yaml
- id: cleaning_timer_weekdays
alias: Takarítás ütemezése hétköznap
trigger:
- platform: template
value_template: '{{ states.sensor.vacuum_start_time_weekdays.state == states.sensor.time.state
}}'
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- data:
entity_id: vacuum.xiaomi_vacuum_cleaner
service: vacuum.start
- id: cleaning_timer_weekend
alias: Takarítás ütemezése hétvégén
trigger:
- platform: template
value_template: '{{ states.sensor.vacuum_start_time_weekend.state == states.sensor.time.state
}}'
condition:
- condition: time
weekday:
- sat
- sun
action:
- data:
entity_id: vacuum.xiaomi_vacuum_cleaner
service: vacuum.start