Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:vertical-stack-in-card
- cards:
- - type: custom:mushroom-template-card
- primary: |-
- {% if is_state('binary_sensor.washer_wash_completed', 'on') and is_state('input_boolean.laundry_room_washer_finished', 'on') %} Washer Finished
- {% elif is_state_attr('sensor.washer', 'error_state', 'on') %} Washer Error
- {% elif is_state('sensor.washer', 'off') and is_state('binary_sensor.washer_tub_clean', 'on') %} Washer Tub Clean Needed
- {% elif is_state('sensor.washer', 'off') and is_state('binary_sensor.laundry_needed', 'on') %} Washer Overdue
- {% elif is_state_attr('sensor.washer', 'remote_start', 'on') and is_state('sensor.washer', 'on') and is_state_attr('sensor.washer', 'run_state', 'Standby') %} Washer
- {% elif is_state_attr('sensor.washer', 'run_state', 'Paused') %} Washer Paused
- {% elif is_state('sensor.washer', 'unavailable') %} Washer Unavailable
- {% else %} Washer
- {% endif %}
- multiline_secondary: true
- secondary: |-
- {% if is_state('binary_sensor.washer_wash_completed', 'on') and is_state('input_boolean.laundry_room_washer_finished', 'on') %}
- Finished {{ 'just now' if (now().timestamp() - as_timestamp(states.binary_sensor.washer_wash_completed.last_changed)) < 30 else relative_time(states.binary_sensor.washer_wash_completed.last_changed) | replace('second', 'sec') | replace('seconds', 'secs') | replace('minute', 'min') | replace('minutes', 'mins') | replace('hour', 'hr') | replace('hours', 'hrs') + ' ago' }}
- {% elif is_state('binary_sensor.washer_error_state', 'on') %}
- {{ state_attr('sensor.washer', 'error_message') }}
- {% elif is_state('binary_sensor.washer_tub_clean', 'on') %}
- {{ state_attr('sensor.washer', 'tubclean_count') }} cycles since last clean
- {% elif is_state_attr('sensor.washer', 'remote_start', 'on') and is_state('sensor.washer', 'on') and is_state_attr('sensor.washer', 'run_state', 'Standby') %}
- Remote start enabled · Tap to start
- {% elif is_state('sensor.washer', 'on') and is_state_attr('sensor.washer', 'run_state', 'Standby') %}
- Standby
- {% elif is_state('sensor.washer', 'on') %}
- {{ state_attr('sensor.washer', 'run_state') }} on {{ state_attr('sensor.washer', 'current_course') }} · {{ states('sensor.washer_time_remaining') | replace(' hours','h') | replace(' hour','h') | replace ( ' minutes','m') | replace ( ' minute','m') }} left · {{ state_attr('sensor.washer', 'end_time') | as_timestamp(now()) | timestamp_custom('%-I:%M %p') }}
- {% elif is_state('sensor.washer', 'unavailable') %}
- Failed to connect to washer
- {% else %}
- Off · Used {{ relative_time(states.input_datetime.washer_last_used.state | as_datetime) | replace('second','sec') | replace('seconds','secs') | replace('minute','min') | replace('minutes','mins') | replace('hour','hr') | replace('hours','hrs') }} ago
- {% endif %}
- entity: sensor.washer
- layout: horizontal
- tap_action: &washer-popup
- action: fire-dom-event
- browser_mod:
- service: browser_mod.popup
- data:
- dismissable: true
- content:
- type: vertical-stack
- cards:
- - type: custom:mushroom-title-card
- title: Washer
- - type: heading
- heading: Controls
- heading_style: subtitle
- icon: mdi:gesture-tap-button
- - square: false
- columns: 2
- type: grid
- cards:
- # CONTROL SENSORS
- - type: tile
- entity: button.washer_remote_start
- name: Remote Start
- icon: mdi:play
- color: green
- hide_state: true
- tap_action:
- action: perform-action
- perform_action: button.press
- target:
- entity_id: button.washer_remote_start
- visibility:
- - condition: state
- entity: button.washer_remote_start
- state_not: 'unavailable'
- - type: tile
- entity: button.washer_pause
- name: Pause
- icon: mdi:pause
- color: amber
- hide_state: true
- tap_action:
- action: perform-action
- perform_action: button.press
- target:
- entity_id: button.washer_pause
- visibility:
- - condition: state
- entity: button.washer_pause
- state_not: 'unavailable'
- - type: tile
- entity: select.washer_course_selection
- name: Course
- color: amber
- hide_state: true
- visibility:
- - condition: state
- entity: select.washer_course_selection
- state_not: unavailable
- layout_options:
- grid_columns: full
- features:
- - type: select-options
- tap_action:
- action: none
- icon_tap_action:
- action: none
- - type: tile
- entity: input_boolean.laundry_room_washer_finished
- name: Unload Washer
- color: amber
- visibility:
- - condition: state
- entity: input_boolean.laundry_room_washer_finished
- state_not: 'off'
- # STATS / DETAILS SENSORS....
- - type: tile
- entity: sensor.washer_current_course
- name: Current Course
- color: cyan
- visibility:
- - condition: state
- entity: sensor.washer_current_course
- state_not: '-'
- # future - Change this to be in its own grid, so you can read the error message long... like copy from tablet last notification
- - type: tile
- entity: binary_sensor.washer_error_state
- name: Error State
- visibility:
- - condition: state
- entity: binary_sensor.washer_error_state
- state_not: 'off'
- - type: tile
- entity: sensor.washer_error_message
- name: Error Message
- visibility:
- - condition: state
- entity: sensor.washer_error_message
- state_not: '-'
- - type: tile
- entity: sensor.washer_run_state
- name: Run State
- color: cyan
- visibility:
- - condition: state
- entity: sensor.washer_run_state
- state_not: '-'
- - type: tile
- entity: sensor.washer_spin_speed
- name: Spin Speed
- color: cyan
- - type: tile
- entity: sensor.washer_water_temp
- name: Water Temp
- color: cyan
- - type: tile
- entity: input_datetime.washer_last_used
- name: Last Used
- color: purple
- tap_action:
- action: none
- hold_action:
- action: more-info
- - type: heading
- heading: Maintenance
- icon: mdi:account-wrench
- heading_style: subtitle
- - type: tile
- entity: input_datetime.washer_last_maintenance
- name: Last Maintenance
- color: purple
- tap_action:
- action: none
- hold_action:
- action: more-info
- - square: false
- columns: 2
- type: grid
- cards:
- - type: custom:mushroom-template-card
- primary: Plumber
- secondary: (XXX) XXX-XXXX
- icon: mdi:phone
- icon_color: "#0FFF50"
- tap_action:
- action: url
- url_path: tel://XXX-XXX-XXXX
- - type: custom:mushroom-template-card
- primary: LG Support
- secondary: 1-800-243-0000
- icon: mdi:phone
- icon_color: "#0FFF50"
- tap_action:
- action: url
- url_path: tel://1-800-243-0000
- - type: custom:mushroom-template-card
- primary: Support Center
- secondary: LG.com
- icon: mdi:note-multiple
- icon_color: pink
- tap_action:
- action: url
- url_path: https://www.lg.com/us/support/product/lg-WM4000HWA.ABWEUUS
- hold_action:
- action: url
- url_path: https://www.lg.com/us/support/product/lg-WM4000HWA.ABWEUUS
- double_tap_action:
- action: url
- url_path: https://www.lg.com/us/support/product/lg-WM4000HWA.ABWEUUS
- - type: custom:mushroom-template-card
- primary: "Serial"
- secondary: "XXXXXX"
- icon: mdi:barcode
- icon_color: "#85C1E9"
- tap_action:
- action: none
- hold_action:
- action: none
- - type: custom:mushroom-template-card
- primary: "Model"
- secondary: "WM4000HWA"
- icon: mdi:information-variant-circle-outline
- icon_color: "#85C1E9"
- tap_action:
- action: none
- hold_action:
- action: none
- - type: custom:mushroom-template-card
- primary: "Purchased"
- secondary: "April 11, 2022"
- icon: mdi:calendar-blank
- icon_color: "#85C1E9"
- tap_action:
- action: none
- hold_action:
- action: none
- card_mod:
- style: |
- ha-dialog {
- --dialog-backdrop-filter: blur(0.8em);
- background: rgba(255, 255, 255, 0.9);
- --mdc-dialog-min-width: 90vw !important;
- --mdc-dialog-min-height: fit-content !important;
- --mdc-dialog-max-width: var(--mdc-dialog-min-width) !important;
- --mdc-dialog-max-height: var(--mdc-dialog-min-height) !important;
- --ha-dialog-border-radius: var(--ha-card-border-radius) !important;
- --vertical-align-dialog: center !important;
- --header-height: 5vh !important;
- --footer-height: var(--header-height) !important;
- --padding-y: 8px !important;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
- }
- .content {
- height: fit-content !important;
- max-height: 90vh !important
- pointer-events: unset !important;
- padding: 0 !important;
- }
- .container {
- padding: 5 !important;
- }
- icon: |-
- {% if is_state('binary_sensor.washer_wash_completed', 'on') and is_state('input_boolean.laundry_room_washer_finished', 'on') %} mdi:check-circle
- {% elif is_state_attr('sensor.washer', 'error_state', 'on') %} mdi:washer-alert
- {% elif is_state('sensor.washer', 'off') and is_state('binary_sensor.laundry_needed', 'on') %} mdi:washing-machine-alert
- {% elif is_state('sensor.washer', 'off') and is_state('binary_sensor.washer_tub_clean', 'on') %} mdi:washing-machine-alert
- {% elif is_state('sensor.washer', 'unavailable') %} mdi:washing-machine-alert
- {% elif is_state('sensor.washer', 'off') %} mdi:washing-machine-off
- {% else %} mdi:washing-machine
- {% endif %}
- icon_color: |-
- {% if is_state('binary_sensor.washer_wash_completed', 'on') and is_state('input_boolean.laundry_room_washer_finished', 'on') %} green
- {% elif is_state('binary_sensor.washer_error_state', 'on') %} red
- {% elif is_state('sensor.washer', 'unavailable') %} disabled
- {% elif is_state('sensor.washer', 'off') and is_state('binary_sensor.laundry_needed', 'on') %} grey
- {% elif is_state('sensor.washer', 'off') and is_state('binary_sensor.washer_tub_clean', 'on') %} grey
- {% elif is_state('sensor.washer', 'off') %} grey
- {% elif is_state_attr('sensor.washer', 'remote_start', 'on') and is_state('sensor.washer', 'on') and is_state_attr('sensor.washer', 'run_state', 'Standby') %} grey
- {% else %} cyan
- {% endif %}
- badge_icon: |-
- {% if is_state('binary_sensor.washer_error_state', 'on') or is_state('binary_sensor.laundry_needed', 'on') or is_state('binary_sensor.washer_tub_clean', 'on') %} mdi:exclamation-thick
- {% elif is_state_attr('sensor.washer', 'run_state', 'Paused') %} mdi:pause
- {% elif is_state('sensor.washer', 'unavailable') %} mdi:exclamation-thick
- {% elif is_state_attr('sensor.washer', 'remote_start', 'on') and is_state('sensor.washer', 'on') and is_state_attr('sensor.washer', 'run_state', 'Standby') %} mdi:play-speed
- {% else %} none
- {% endif %}
- badge_color: |-
- {% if is_state('binary_sensor.washer_error_state', 'on') or is_state('binary_sensor.laundry_needed', 'on') or is_state('binary_sensor.washer_tub_clean', 'on') %} orange
- {% elif is_state_attr('sensor.washer', 'run_state', 'Paused') %} orange
- {% elif is_state('sensor.washer', 'unavailable') %} orange
- {% elif is_state_attr('sensor.washer', 'remote_start', 'on') and is_state('sensor.washer', 'on') and is_state_attr('sensor.washer', 'run_state', 'Standby') %} cyan
- {% else %} none
- {% endif %}
- # Below media query makes cards larger on tablet so I can use this one card for both dashboards, work in progress, tweak more...
- card_mod:
- style: |
- @media screen and (min-width: 768px) and (max-width: 1300px) {
- ha-card {
- --icon-size: 150px;
- --card-primary-font-size: 40px;
- --card-primary-font-weight: bold;
- --card-primary-line-height: 40px;
- --card-secondary-font-size: 20px;
- --card-secondary-line-height: 50px;
- margin-top: 8px;
- margin-bottom: 1.5rem;
- }
- }
- ha-state-icon {
- {% if is_state('sensor.washer', 'on') and is_state_attr('sensor.washer', 'run_completed', 'off') and state_attr('sensor.washer', 'run_state') not in ['Standby', 'Paused'] %}
- animation: shake 400ms ease-in-out infinite, drum 2s ease infinite;
- transform-origin: 50% 110%;
- {% elif is_state('binary_sensor.washer_error_state', 'on') %}
- animation: shake 400ms ease-in-out infinite, drum 2s ease infinite;
- transform-origin: 50% 110%;
- {% else %}
- {% endif %}
- }
- @keyframes shake {
- 0%, 100% { transform: translate(0, 0) rotate(0); }
- 20% { transform: translate(0.4px, -0.4px) rotate(-4deg); }
- 40% { transform: translate(-0.4px, 0.4px) rotate(4deg); }
- 60% { transform: translate(0.4px, 0.4px) rotate(-4deg); }
- 80% { transform: translate(-0.4px, -0.4px) rotate(4deg); }
- }
- @keyframes drum {
- 50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 34% 68%, 60% 41%, 71% 56%, 65% 74%, 47% 79%, 32% 69%, 35% 100%, 100% 100%, 100% 0); }
- }
- # 🔶 FUTURE: Tablet styling needs to change bar_height from 5px to 20px
- # FUTURE: I might want to remove the text_width to 0px so it doesn't show timer duration, as it's already shown on washer card above.. duplicate info?
- - type: custom:timer-bar-card
- entities:
- - sensor.washer
- sync_issues: ignore
- compressed: true
- bar_width: 60%
- bar_height: 5px
- bar_radius: 5px
- text_width: 0px #60px
- layout: full_row
- bar_foreground: '#00bcd4'
- bar_background: '#163c40'
- icon: mdi:washing-machine
- tap_action: *washer-popup
- visibility:
- - entity: sensor.washer
- state: 'on'
- - entity: sensor.washer_run_state
- state_not: 'Standby'
- - entity: sensor.washer_run_state
- state_not: 'Paused'
- - entity: binary_sensor.washer_wash_completed
- state_not: 'on'
- # To fix mobile display, change to -32px for margin-bottom?
- card_mod:
- style: |
- ha-card {
- border: none;
- background: none;
- background-color: transparent;
- margin-top: -32px;
- margin-left: 0px;
- margin-right: 0px;
- margin-bottom: -16px; /* Default for non-tablet */
- }
- @media screen and (min-width: 768px) and (max-width: 1300px) {
- ha-card {
- margin-bottom: unset; /* Removes margin-bottom for tablets */
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement