Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BUTTON CARD TEMPLATE:
- #################### nagłówki
- header:
- styles:
- card:
- - padding: 5px 15px
- - background-color: var(--paper-item-icon-color)
- - margin: 0px auto 0px auto
- name:
- - text-transform: uppercase
- - color: var(--primary-background-color)
- - justify-self: start
- - font-weight: bold
- - font-size: 1.2em
- default_vertical:
- hold_action:
- action: more-info
- styles:
- - size: 40%
- icon:
- - color: auto
- name:
- - padding-top: 15px
- - letter-spacing: 0px
- state:
- - value: "off"
- background-color: rgb(0, 0, 0)
- default_icon:
- template: default_vertical
- show_name: false
- styles:
- icon:
- - color: var(--state-icon-color)
- LOVELACE VIEW:
- #################### odkurzacz
- - type: vertical-stack
- cards:
- - type: custom:button-card
- style: &round_card |
- ha-card {
- border-radius: 12px !important;
- ### warunek przygotowany pod zmianę themsa na czarny gdy zajdzie słońce - ale na razie nie jest używany
- box-shadow:
- {% if is_state('sun.sun', 'below_horizon') %}
- 0px 0px 5px 1px rgba(0,0,0,0.25);
- {% else %}
- 0px 0px 5px 1px rgba(0,0,0,0.25);
- {% endif %}
- }
- ha-card div.no-header {
- padding-top: 2px !important;
- }
- ha-card div.no-header div.entity {
- margin-bottom: 2px !important;
- font-size: 0.9em !important;
- }
- template: header
- name: Rosita Jetson
- #################### status
- - type: horizontal-stack
- cards:
- - attribute: battery_level
- name: "\U0001f50b"
- type: custom:circle-sensor-card
- entity: vacuum.1_lvn_rosita
- max: 100
- min: 0
- units: "%"
- stroke_width: 10
- color_stops:
- 20: '#DF4C1E'
- 70: '#f4b400'
- 100: '#0DA035'
- - attribute: main_brush_left
- name: "\U0001f300"
- type: custom:circle-sensor-card
- entity: vacuum.1_lvn_rosita
- max: 300
- min: 0
- units: "h"
- stroke_width: 10
- color_stops:
- 7: '#DF4C1E'
- 60: '#f4b400'
- 100: '#0DA035'
- 295: '#039be5'
- - attribute: side_brush_left
- name: "\U0001f9f9"
- type: custom:circle-sensor-card
- entity: vacuum.1_lvn_rosita
- max: 300
- min: 0
- units: "h"
- stroke_width: 10
- color_stops:
- 7: '#DF4C1E'
- 60: '#f4b400'
- 100: '#0DA035'
- 295: '#039be5'
- - attribute: filter_left
- name: "\U0001f637"
- type: custom:circle-sensor-card
- entity: vacuum.1_lvn_rosita
- max: 150
- min: 0
- units: "h"
- stroke_width: 10
- color_stops:
- 7: '#DF4C1E'
- 50: '#f4b400'
- 100: '#0DA035'
- 150: '#039be5'
- - attribute: sensor_dirty_left
- name: "\U0001f6bf"
- type: custom:circle-sensor-card
- entity: vacuum.1_lvn_rosita
- max: 30
- min: 0
- units: "h"
- stroke_width: 10
- color_stops:
- 5: '#DF4C1E'
- 10: '#f4b400'
- 20: '#0DA035'
- 30: '#039be5'
- #################### pilot
- - type: horizontal-stack
- cards:
- - name: Start
- type: custom:button-card
- style: *round_card
- template: default_icon
- entity: vacuum.1_lvn_rosita
- color_type: icon
- icon: mdi:play
- styles:
- icon:
- - color: >
- [[[
- var temps = `${entity.state}`;
- return (temps == 'cleaning') ? 'var(--state-icon-active-color)' : 'var(--state-icon-color)';
- ]]]
- tap_action:
- action: call-service
- service: vacuum.start
- service_data:
- entity_id: vacuum.1_lvn_rosita
- - name: Punktowe
- type: custom:button-card
- style: *round_card
- template: default_icon
- entity: vacuum.1_lvn_rosita
- color_type: icon
- icon: mdi:bullseye
- styles:
- icon:
- - color: >
- [[[
- var temps = `${entity.state}`;
- return (temps == 'spot') ? 'var(--state-icon-active-color)' : 'var(--state-icon-color)';
- ]]]
- tap_action:
- action: call-service
- service: vacuum.clean_spot
- service_data:
- entity_id: vacuum.1_lvn_rosita
- - name: Przerwa
- type: custom:button-card
- style: *round_card
- template: default_icon
- entity: vacuum.1_lvn_rosita
- color_type: icon
- icon: mdi:pause
- tap_action:
- action: call-service
- service: vacuum.pause
- service_data:
- entity_id: vacuum.1_lvn_rosita
- styles:
- icon:
- - color: >
- [[[
- var temps = `${entity.state}`;
- return (temps == 'paused') ? 'var(--state-icon-active-color)' : 'var(--state-icon-color)';
- ]]]
- - name: Stop
- type: custom:button-card
- style: *round_card
- template: default_icon
- entity: vacuum.1_lvn_rosita
- color_type: icon
- icon: mdi:stop
- tap_action:
- action: call-service
- service: vacuum.stop
- service_data:
- entity_id: vacuum.1_lvn_rosita
- - name: Dokuj
- type: custom:button-card
- style: *round_card
- template: default_icon
- entity: vacuum.1_lvn_rosita
- color_type: icon
- icon: mdi:home
- styles:
- icon:
- - color: >
- [[[
- var temps = `${entity.state}`;
- return (temps == 'returning') ? 'var(--state-icon-active-color)' : 'var(--state-icon-color)';
- ]]]
- tap_action:
- action: call-service
- service: vacuum.return_to_base
- service_data:
- entity_id: vacuum.1_lvn_rosita
- - name: Valetudo
- type: custom:button-card
- style: *round_card
- template: default_icon
- entity: vacuum.1_lvn_rosita
- color_type: icon
- icon: mdi:remote
- styles:
- icon:
- - color: >
- [[[
- var temps = `${entity.state}`;
- return (temps == 'docked') ? 'var(--state-icon-color)' : 'var(--state-icon-active-color)';
- ]]]
- tap_action:
- action: url
- url_path: !secret rosita_url
- #################### mapka
- - type: custom:xiaomi-vacuum-map-card
- style: *round_card
- entity: vacuum.1_lvn_rosita
- map_image: '/local/vacuum_maps/vacuum_map_0_v202001262333.png'
- language: pl
- calibration_points:
- - vacuum:
- # baza
- x: 25610
- y: 25877
- map:
- x: 212
- y: 114
- - vacuum:
- # rosita w kuchni
- x: 31289
- y: 24544
- map:
- x: 659
- y: 220
- - vacuum:
- # rosita pod schodami
- x: 29844
- y: 22261
- map:
- x: 545
- y: 396
- zones:
- - [[29534,25169,32819,24201,1]] # Kuchnia
- - [[31801,23576,33493,22291,1]] # Korytarz
- - [[24827,21513,27060,20321,1]] # Taras
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement