Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:local-conditional-card
- default: show
- card:
- type: custom:mod-card
- card_mod:
- style: |
- ha-card {
- height: 630px;
- border: solid 5px var(--sidebar);
- box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.36);
- card:
- type: vertical-stack
- cards:
- - type: custom:button-card
- entity: vacuum.vacky
- show_name: false
- show_entity_picture: true
- entity_picture: /local/ic/vacuum.svg
- custom_fields:
- button:
- card:
- type: custom:mushroom-chips-card
- chips:
- - type: template
- tap_action:
- action: fire-dom-event
- local_conditional_card:
- action: set
- ids:
- - vacuum: hide
- - vacuum_map: show
- icon: mdi:map-marker
- icon_color: white
- primary: Marker
- card_mod:
- style:
- mushroom-template-chip:nth-child(1)$:
- mushroom-chip$: |
- ha-card {
- padding: 5px !important;
- border-radius: 100px !important;
- --chip-background: rgba(223,130,108, 1) !important;
- }
- ha-card:active {
- transform: translateY(1.5px);
- transition: 0s;
- box-shadow: 0 0.5px 2px 0 rgba(0, 0, 0, 0.16);
- }
- .: |
- ha-state-icon {
- animation: boing 3s ease infinite;
- transform-origin: 50% 90%;
- }
- @keyframes boing {
- 0% { transform: scale3d(1, 1, 1); }
- 7% { transform: translateY(-4px) scale3d(0.75, 1.25, 1); }
- 10% { transform: scale3d(1.25, 0.75, 1); }
- 12% { transform: translateY(-2px) scale3d(0.85, 1.15, 1); }
- 16% { transform: scale3d(1.05, 0.95, 1); }
- 19% { transform: scale3d(0.95, 1.05, 1); }
- 25% { transform: scale3d(1, 1, 1); }
- }
- styles:
- custom_fields:
- button:
- - position: absolute
- - top: 20px
- - right: 30px
- - background: none
- styles:
- icon:
- - height: 10px
- card:
- - border-radius: 20px
- - height: 240px
- - margin-top: '-1px'
- - margin-right: 1px
- icon:
- - height: 140px
- - width: 140px
- - margin-top: '-50px'
- - filter: brightness(0.9)
- state:
- - operator: default
- styles:
- icon:
- - animation: cleaning 5s linear infinite
- card:
- - background: var(--sidebar)
- - value: returning
- styles:
- icon:
- - animation: returning 2s linear infinite
- card:
- - background: var(--sidebar)
- - value: paused
- styles:
- icon:
- - opacity: 100%
- card:
- - background: var(--contrast2)
- - value: docked
- styles:
- icon:
- - opacity: 50%
- card:
- - background: transparent
- extra_styles: |
- @keyframes cleaning {
- 0% {
- transform: rotate(0) translate(0);
- }
- 5% {
- transform: rotate(0) translate(0, -10px);
- }
- 10% {
- transform: rotate(0) translate(0, 5px);
- }
- 15% {
- transform: rotate(0) translate(0);
- }
- /* Turn left */
- 20% {
- transform: rotate(30deg) translate(0);
- }
- 25% {
- transform: rotate(30deg) translate(0, -10px);
- }
- 30% {
- transform: rotate(30deg) translate(0, 5px);
- }
- 35% {
- transform: rotate(30deg) translate(0);
- }
- 40% {
- transform: rotate(0) translate(0);
- }
- /* Turn right */
- 45% {
- transform: rotate(-30deg) translate(0);
- }
- 50% {
- transform: rotate(-30deg) translate(0, -10px);
- }
- 55% {
- transform: rotate(-30deg) translate(0, 5px);
- }
- 60% {
- transform: rotate(-30deg) translate(0);
- }
- 70% {
- transform: rotate(0deg) translate(0);
- }
- /* Staying still */
- 100% {
- transform: rotate(0deg);
- }
- }
- @keyframes returning {
- 0% {
- transform: rotate(0);
- }
- 25% {
- transform: rotate(10deg);
- }
- 50% {
- transform: rotate(0);
- }
- 75% {
- transform: rotate(-10deg);
- }
- 100% {
- transform: rotate(0);
- }
- }
- - type: custom:mod-card
- card:
- type: custom:swipe-card
- start_card: 1
- reset_after: 15
- parameters:
- pagination:
- type: bullets
- clickable: true
- effect: cube
- grabCursor: true
- cubeEffect:
- shadow: false
- loop: false
- cards:
- - square: false
- columns: 1
- type: grid
- card_mod:
- class: nav_1
- cards:
- - type: vertical-stack
- cards:
- - square: false
- type: horizontal-stack
- cards:
- - type: custom:button-card
- color_type: blank-card
- - type: custom:button-card
- entity: vacuum.vacky
- show_name: false
- tap_action:
- action: call-service
- service: vacuum.set_fan_speed
- target:
- entity_id: vacuum.vacky
- data:
- fan_speed: Silent
- styles:
- icon:
- - width: 15px
- card:
- - height: 40px
- - width: 40px
- state:
- - operator: template
- value: >
- [[[
- return
- (states['vacuum.vacky'].attributes.fan_speed ===
- 'Silent' ) && states['vacuum.vacky'].state ===
- 'cleaning'
- ]]]
- icon: mdi:fan
- color: black
- styles:
- icon:
- - animation:
- - rotating 2s linear infinite
- card:
- - background-color: '#FFC700'
- - operator: template
- value: >
- [[[
- return
- (states['vacuum.vacky'].attributes.fan_speed ===
- 'Silent' ) && states['vacuum.vacky'].state ===
- 'docked'
- ]]]
- icon: mdi:fan
- color: var(--contrast3)
- styles:
- name:
- - color: var(--contrast3)
- card:
- - background-color: '#FFC700'
- - operator: default
- icon: mdi:fan
- styles:
- name:
- - color: var(--contrast9)
- card:
- - background-color: '#A5D09B'
- - type: custom:button-card
- entity: vacuum.vacky
- show_name: false
- tap_action:
- action: call-service
- service: vacuum.set_fan_speed
- target:
- entity_id: vacuum.vacky
- data:
- fan_speed: Standard
- styles:
- icon:
- - width: 20px
- card:
- - height: 40px
- - width: 40px
- state:
- - operator: template
- value: >
- [[[
- return
- (states['vacuum.vacky'].attributes.fan_speed ===
- 'Standard' ) && states['vacuum.vacky'].state ===
- 'cleaning'
- ]]]
- icon: mdi:fan
- color: black
- styles:
- name:
- - color: black
- icon:
- - animation:
- - rotating 1.5s linear infinite
- card:
- - background-color: '#FFC700'
- - operator: default
- icon: mdi:fan
- styles:
- name:
- - color: var(--contrast9)
- card:
- - background-color: '#A5D09B'
- - operator: template
- value: >
- [[[
- return
- (states['vacuum.vacky'].attributes.fan_speed ===
- 'Standard' ) && states['vacuum.vacky'].state ===
- 'docked'
- ]]]
- icon: mdi:fan
- color: var(--contrast3)
- styles:
- name:
- - color: var(--contrast3)
- card:
- - background-color: '#FFC700'
- - type: custom:button-card
- entity: vacuum.vacky
- show_name: false
- tap_action:
- action: call-service
- service: vacuum.set_fan_speed
- target:
- entity_id: vacuum.vacky
- data:
- fan_speed: Medium
- styles:
- icon:
- - width: 25px
- card:
- - height: 40px
- - width: 40px
- state:
- - operator: template
- value: >
- [[[
- return
- (states['vacuum.vacky'].attributes.fan_speed ===
- 'Medium' ) && states['vacuum.vacky'].state ===
- 'cleaning'
- ]]]
- icon: mdi:fan
- color: black
- styles:
- name:
- - color: black
- icon:
- - animation:
- - rotating 1.0s linear infinite
- card:
- - background-color: '#FFC700'
- - operator: template
- value: >
- [[[
- return
- (states['vacuum.vacky'].attributes.fan_speed ===
- 'Medium' ) && states['vacuum.vacky'].state ===
- 'docked'
- ]]]
- icon: mdi:fan
- color: var(--contrast3)
- styles:
- name:
- - color: var(--contrast3)
- card:
- - background-color: '#FFC700'
- - operator: default
- icon: mdi:fan
- styles:
- name:
- - color: var(--contrast9)
- card:
- - background-color: '#A5D09B'
- - type: custom:button-card
- entity: vacuum.vacky
- show_name: false
- tap_action:
- action: call-service
- service: vacuum.set_fan_speed
- target:
- entity_id: vacuum.vacky
- data:
- fan_speed: Turbo
- styles:
- icon:
- - width: 30px
- card:
- - height: 40px
- - width: 40px
- state:
- - operator: template
- value: >
- [[[
- return
- (states['vacuum.vacky'].attributes.fan_speed ===
- 'Turbo' ) && states['vacuum.vacky'].state ===
- 'cleaning'
- ]]]
- icon: mdi:fan
- color: black
- styles:
- name:
- - color: black
- icon:
- - animation:
- - rotating 0.5s linear infinite
- card:
- - background-color: '#FFC700'
- - operator: template
- value: >
- [[[
- return
- (states['vacuum.vacky'].attributes.fan_speed ===
- 'Turbo' ) && states['vacuum.vacky'].state ===
- 'docked'
- ]]]
- icon: mdi:fan
- color: var(--contrast3)
- styles:
- name:
- - color: var(--contrast3)
- card:
- - background-color: '#FFC700'
- - operator: default
- icon: mdi:fan
- - operator: default
- icon: mdi:fan
- styles:
- name:
- - color: var(--contrast9)
- card:
- - background-color: '#A5D09B'
- - type: custom:button-card
- color_type: blank-card
- - square: false
- type: grid
- cards:
- - type: custom:button-card
- template: vacuum_button
- variables:
- name: Cucina
- label: |
- [[[
- if (states[entity.entity_id].state === 'on' )
- return "selezionato"
- else return (states['sensor.vacky_ultimo_avvio'].attributes.cucina)
- ]]]
- entity: input_boolean.pulisci_cucina
- - type: custom:button-card
- template: vacuum_button
- variables:
- name: Soggiorno
- label: |
- [[[
- if (states[entity.entity_id].state === 'on' )
- return "selezionato"
- else return (states['sensor.vacky_ultimo_avvio'].attributes.soggiorno)
- ]]]
- entity: input_boolean.pulisci_soggiorno
- - type: custom:button-card
- template: vacuum_button
- variables:
- name: Ingresso
- label: |
- [[[
- if (states[entity.entity_id].state === 'on' )
- return "selezionato"
- else return (states['sensor.vacky_ultimo_avvio'].attributes.ingresso)
- ]]]
- entity: input_boolean.pulisci_ingresso
- - type: custom:button-card
- template: vacuum_button
- variables:
- name: Corridoio
- label: |
- [[[
- if (states[entity.entity_id].state === 'on' )
- return "selezionato"
- else return (states['sensor.vacky_ultimo_avvio'].attributes.corridoio)
- ]]]
- entity: input_boolean.pulisci_corridoio
- - type: custom:button-card
- template: vacuum_button
- variables:
- name: Camera
- label: |
- [[[
- if (states[entity.entity_id].state === 'on' )
- return "selezionato"
- else return (states['sensor.vacky_ultimo_avvio'].attributes.camera)
- ]]]
- entity: input_boolean.pulisci_camera
- - type: custom:button-card
- template: vacuum_button
- variables:
- name: Cameretta
- label: |
- [[[
- if (states[entity.entity_id].state === 'on' )
- return "selezionato"
- else return (states['sensor.vacky_ultimo_avvio'].attributes.cameretta)
- ]]]
- entity: input_boolean.pulisci_cameretta
- - type: custom:button-card
- template: vacuum_button
- variables:
- name: Studio
- label: |
- [[[
- if (states[entity.entity_id].state === 'on' )
- return "selezionato"
- else return (states['sensor.vacky_ultimo_avvio'].attributes.studio)
- ]]]
- entity: input_boolean.pulisci_studio
- - type: custom:button-card
- template: vacuum_button
- variables:
- name: Camere
- label: |
- [[[
- if (states[entity.entity_id].state === 'on' )
- return "selezionato"
- else return (states['sensor.vacky_ultimo_avvio'].attributes.camere)
- ]]]
- entity: input_boolean.pulisci_camere
- columns: 2
- - square: false
- type: grid
- cards:
- - type: custom:button-card
- template: vacuum_button
- variables:
- name: Avvia aspirapolvere
- background_off: '#A5D09B'
- background_on: '#FFC700'
- label: |
- [[[
- if (states['script.avvia_aspirapolvere'].state === 'on' )
- return helpers.relativeTime(states['script.avvia_aspirapolvere'].attributes.last_triggered)
- ]]]
- entity: input_boolean.pulisci_tutto
- tap_action:
- action: call-service
- service: script.avvia_aspirapolvere
- target: {}
- columns: 1
- - square: false
- columns: 1
- type: grid
- card_mod:
- class: nav_2
- cards:
- - square: false
- type: grid
- cards:
- - type: custom:button-card
- entity: vacuum.vacky
- label: Stato
- name: |
- [[[
- return helpers.localize(entity)
- ]]]
- template: sensor_vacuum
- - type: custom:button-card
- entity: vacuum.vacky
- icon: mdi:battery-charging-100
- label: Batteria
- name: |
- [[[
- return entity.attributes.battery_level + '<span style="font-size: 0.8em"> %</span>'
- ]]]
- template: sensor_vacuum
- - type: custom:button-card
- entity: vacuum.vacky
- label: Area pulita
- icon: mdi:texture-box
- name: |
- [[[
- return Math.round(entity.attributes.cleaned_area) + '<span style="font-size: 0.8em"> m²<span>'
- ]]]
- template: sensor_vacuum
- - type: custom:button-card
- entity: vacuum.vacky
- label: Tempo di pulizia
- icon: mdi:timer-sand
- name: |
- [[[
- return Math.round(entity.attributes.cleaning_time) + '<span style="font-size: 0.8em"> min<span>'
- ]]]
- template: sensor_vacuum
- - type: custom:button-card
- entity: sensor.filtro
- label: Filtro
- name: |
- [[[
- return entity.state + '<span style="font-size: 0.8em"> %</span>'
- ]]]
- template: sensor_vacuum
- state:
- - operator: template
- value: |
- [[[
- return entity.state < '20'
- ]]]
- styles:
- card:
- - background: var(--red)
- - type: custom:button-card
- entity: sensor.spazzola_principale
- label: Spazzola principale
- name: |
- [[[
- return entity.state + '<span style="font-size: 0.8em"> %</span>'
- ]]]
- template: sensor_vacuum
- state:
- - operator: template
- value: |
- [[[
- return entity.state < '20'
- ]]]
- styles:
- card:
- - background: var(--red)
- - type: custom:button-card
- entity: sensor.spazzola_laterale
- label: Spazzola laterale
- name: |
- [[[
- return entity.state + '<span style="font-size: 0.8em"> %</span>'
- ]]]
- template: sensor_vacuum
- state:
- - operator: template
- value: |
- [[[
- return entity.state < '20'
- ]]]
- styles:
- card:
- - background: var(--red)
- - type: custom:button-card
- entity: sensor.panno_di_pulizia
- label: Panno di pulizia
- name: |
- [[[
- return entity.state + '<span style="font-size: 0.8em"> %</span>'
- ]]]
- template: sensor_vacuum
- state:
- - operator: template
- value: |
- [[[
- return entity.state < '20'
- ]]]
- styles:
- card:
- - background: var(--red)
- columns: 2
- style:
- swipe-card$: |
- .swiper-container {
- margin: 0px 0 0 0 !important;
- padding: 65px 30px 10px 30px !important;
- }
- .swiper-pagination-bullets {
- position: absolute;
- top: 15px;
- bottom: inherit !important;
- width: 60%;
- font-size: 12px;
- color: white;
- }
- .swiper-pagination-bullets>span {
- margin: 0px !important;
- min-width: 80px;
- min-height: 25px;
- padding-top: 5px;
- border-radius: 0;
- background: var(--sidebar);
- }
- .swiper-pagination-bullets>span:last-child {
- border-radius: 0px 10px 10px 0px;
- }
- .swiper-pagination-bullets>span:first-child {
- border-radius: 10px 0 0 10px;
- }
- .swiper-pagination-bullets>span:nth-child(1):before {
- content: "STANZE";
- }
- .swiper-pagination-bullets>span:nth-child(2):before {
- content: "RICAMBI";
- }
- .swiper-pagination-bullets>span:nth-child(3):before {
- content: "ACCESSI";
- }
- .: |
- ha-card {
- height: 335px;
- padding: 15px 0;
- margin-top: -55px;
- background: var(--contrast1);
- }
- id: vacuum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement