mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-05 08:44:24 +00:00
Initial Vacuum implementation
This commit is contained in:
@@ -164,7 +164,10 @@
|
||||
state_indicator_off_size: 0px
|
||||
state_indicator_on_color: var(--color-red)
|
||||
state_on_indicator_on_color: var(--color-red)
|
||||
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
entity: vacuum.vacuum
|
||||
name: Vacuum
|
||||
- type: custom:decluttering-card
|
||||
template: brita_water_card
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
- type: custom:mod-card
|
||||
style:
|
||||
layout-card:
|
||||
$:
|
||||
.: |
|
||||
#columns {
|
||||
padding: 0 10px;
|
||||
}
|
||||
#columns .column {
|
||||
padding: 0 10px;
|
||||
}
|
||||
card:
|
||||
type: custom:layout-card
|
||||
layout: horizontal
|
||||
max_columns: 2
|
||||
cards:
|
||||
- type: custom:vacuum-card
|
||||
entity: vacuum.vacuum
|
||||
stats:
|
||||
default:
|
||||
- attribute: filter_left
|
||||
unit: hours
|
||||
subtitle: Filter
|
||||
- attribute: side_brush_left
|
||||
unit: hours
|
||||
subtitle: Side brush
|
||||
- attribute: main_brush_left
|
||||
unit: hours
|
||||
subtitle: Main brush
|
||||
- attribute: sensor_dirty_left
|
||||
unit: hours
|
||||
subtitle: Sensors
|
||||
cleaning:
|
||||
- attribute: cleaned_area
|
||||
unit: m2
|
||||
subtitle: Cleaning area
|
||||
- attribute: cleaning_time
|
||||
unit: minutes
|
||||
subtitle: Cleaning time
|
||||
- type: custom:xiaomi-vacuum-map-card
|
||||
entity: vacuum.vacuum
|
||||
camera_calibration: true
|
||||
map_camera: camera.xiaomi_cloud_map_extractor
|
||||
@@ -44,15 +44,18 @@
|
||||
url: /hacsfiles/kb-better-graph-colors/kb-better-graph-colors.js
|
||||
- type: module
|
||||
url: /hacsfiles/travel-time-card/travel-time-card.js
|
||||
- type: module
|
||||
url: /hacsfiles/vacuum-card/vacuum-card.js
|
||||
- type: module
|
||||
url: /hacsfiles/vertical-stack-in-card/vertical-stack-in-card.js
|
||||
- type: module
|
||||
url: /hacsfiles/weather-card/weather-card.js
|
||||
- type: module
|
||||
url: /hacsfiles/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js
|
||||
- type: module
|
||||
url: /hacsfiles/zigbee2mqtt-networkmap/zigbee2mqtt-networkmap.js
|
||||
|
||||
|
||||
|
||||
- type: module
|
||||
url: /hacsfiles/lovelace-folder-card/folder-card.js
|
||||
- type: module
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
vacuum:
|
||||
- platform: xiaomi_miio
|
||||
host: !secret vacuum_host
|
||||
token: !secret vacuum_token
|
||||
name: vacuum
|
||||
|
||||
camera:
|
||||
- platform: xiaomi_cloud_map_extractor
|
||||
host: !secret vacuum_host
|
||||
token: !secret vacuum_token
|
||||
username: !secret vacuum_username
|
||||
password: !secret vacuum_password
|
||||
draw: ['all']
|
||||
attributes:
|
||||
- calibration_points
|
||||
- charger
|
||||
- goto
|
||||
- goto_path
|
||||
- goto_predicted_path
|
||||
- image
|
||||
- is_empty
|
||||
- map_name
|
||||
- no_go_areas
|
||||
- no_mopping_areas
|
||||
- obstacles
|
||||
- path
|
||||
- room_numbers
|
||||
- rooms
|
||||
- vacuum_position
|
||||
- vacuum_room
|
||||
- walls
|
||||
- zones
|
||||
colors:
|
||||
color_map_outside: [35, 35, 35]
|
||||
color_map_wall: [255, 255, 255]
|
||||
color_map_inside: [10, 10, 10]
|
||||
room_colors:
|
||||
1: [240, 178, 122]
|
||||
2: [133, 193, 233]
|
||||
3: [217, 136, 128]
|
||||
4: [52, 152, 219]
|
||||
5: [205, 97, 85]
|
||||
6: [243, 156, 18]
|
||||
@@ -73,6 +73,11 @@ tautulli_url: url
|
||||
portainer_url: url
|
||||
tasmo_admin_url: url
|
||||
|
||||
vacuum_host: 127.0.0.1
|
||||
vacuum_token: token
|
||||
vacuum_username: email
|
||||
vacuum_password: password
|
||||
|
||||
#
|
||||
# ─── CLOUD AUTHENTICATION ───────────────────────────────────────────────────────
|
||||
#
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
>-
|
||||
|
||||
{% set brita_filter = is_state('binary_sensor.brita_should_change_filter', 'on') %}
|
||||
|
||||
{% set purifier_filter = is_state('binary_sensor.purifier_filter_needs_change', 'on') %}
|
||||
{% set purifier_water = is_state('binary_sensor.purifier_out_of_water', 'on') %}
|
||||
{% set has_tasks = brita_filter or purifier_filter or purifier_water %}
|
||||
{% set has_purifier_tasks = purifier_filter or purifier_water %}
|
||||
|
||||
{% set vacuum_entity = 'vacuum.vacuum' %}
|
||||
{% set vacuum_main_brush = state_attr(vacuum_entity, 'main_brush_left') | int == 0 %}
|
||||
{% set vacuum_side_brush = state_attr(vacuum_entity, 'side_brush_left') | int == 0 %}
|
||||
{% set vacuum_filter = state_attr(vacuum_entity, 'filter_left') | int == 0 %}
|
||||
{% set vacuum_sensor = state_attr(vacuum_entity, 'sensor_dirty_left') | int == 0 %}
|
||||
{% set has_vacuum_tasks = vacuum_main_brush or vacuum_side_brush or vacuum_filter or vacuum_sensor %}
|
||||
|
||||
{% set has_tasks = brita_filter or has_purifier_tasks or has_vacuum_tasks %}
|
||||
|
||||
{%- if has_tasks -%} {{
|
||||
[
|
||||
@@ -13,6 +23,10 @@
|
||||
] | random
|
||||
}} {% endif %}
|
||||
|
||||
{%- if brita_filter -%} Brita needs filter change. {% endif %}
|
||||
{%- if purifier_filter -%} Purifier needs filter change. {% endif %}
|
||||
{%- if purifier_water -%} Purifier needs water. {%- endif -%}
|
||||
{%- if brita_filter -%} Brita needs filter change. {% endif %}
|
||||
{%- if purifier_filter -%} Purifier needs filter change. {% endif %}
|
||||
{%- if purifier_water -%} Purifier needs water. {%- endif -%}
|
||||
{%- if vacuum_main_brush -%} Vacuum main brush needs changing. {%- endif -%}
|
||||
{%- if vacuum_side_brush -%} Vacuum side brush needs changing. {%- endif -%}
|
||||
{%- if vacuum_filter -%} Vacuum filter needs changing. {%- endif -%}
|
||||
{%- if vacuum_sensor -%} Vacuum sensor needs cleaning. {%- endif -%}
|
||||
|
||||
@@ -34,3 +34,8 @@ views:
|
||||
icon: "mdi:door-closed"
|
||||
panel: true
|
||||
cards: !include lovelace/home_dashboard/hallway_dashboard.yaml
|
||||
- title: Vacuum
|
||||
path: vacuum
|
||||
icon: "mdi:robot-vacuum"
|
||||
panel: true
|
||||
cards: !include lovelace/home_dashboard/vacuum_dashboard.yaml
|
||||
|
||||
Reference in New Issue
Block a user