Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- square: true
- type: custom:layout-card
- cards:
- - type: vertical-stack
- view_layout: null
- grid-area: left
- cards:
- - type: picture-elements
- elements:
- - type: conditional
- conditions:
- - condition: state
- state_not: unavailable
- entity: sensor.p1s_<SERIAL>_ams_1_id
- - condition: state
- state_not: unknown
- entity: sensor.p1s_<SERIAL>_ams_1_id
- elements:
- - type: state-label
- entity: sensor.p1s_<SERIAL>_ams_1_id
- tap_action:
- action: none
- style:
- top: 77%
- left: 9.6%
- text-align: center
- font-size: 0.84em
- background-color: rgba(0,0,0,0)
- box-shadow: 0 0 3px 3px rgba(0, 0, 0, 0)
- border-radius: 10px
- pointer-events: none
- color: "#FFFFFF"
- - type: state-label
- entity: sensor.p1s_<SERIAL>_ams_1_tray_1
- tap_action:
- action: none
- style:
- top: 28%
- left: 21.5%
- text-align: center
- font-size: 0em
- background-color: var(--tray_1_color)
- opacity: 90%
- box-shadow: 0 0 3px 3px var(--tray_1_bg)
- border-radius: 2px
- width: 14%
- height: 40%
- pointer-events: none
- - type: custom:config-template-card
- entities:
- - sensor.p1s_<SERIAL>_ams_1_tray_1
- element:
- type: state-icon
- entity: sensor.p1s_<SERIAL>_ams_1_tray_1
- icon: mdi:numeric-1-circle
- style:
- top: 28%
- left: 21.4%
- "--paper-item-icon-color": white
- background-color: rgba(0,0,0,0.5)
- box-shadow: 0 0 5px 5px var(--tray_1_bg)
- border-radius: 50px
- "--mdc-icon-size": 2.4em
- - type: state-label
- entity: sensor.p1s_<SERIAL>_ams_1_tray_1
- attribute: type
- tap_action:
- action: none
- style:
- top: 77%
- left: 21%
- text-align: center
- font-size: 1em
- background-color: rgba(0,0,0,0.4)
- box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
- border-radius: 50px
- pointer-events: none
- color: "#FFFFFF"
- - type: state-label
- entity: sensor.p1s_<SERIAL>_ams_1_tray_2
- tap_action:
- action: none
- style:
- top: 28%
- left: 39.65%
- text-align: center
- font-size: 0em
- background-color: var(--tray_2_color)
- opacity: 90%
- box-shadow: 0 0 3px 3px var(--tray_2_bg)
- border-radius: 2px
- width: 14%
- height: 40%
- pointer-events: none
- - type: custom:config-template-card
- entities:
- - sensor.p1s_<SERIAL>_ams_1_tray_2
- element:
- type: state-icon
- entity: sensor.p1s_<SERIAL>_ams_1_tray_2
- icon: mdi:numeric-2-circle
- style:
- top: 28%
- left: 39.7%
- "--paper-item-icon-color": white
- background-color: rgba(0,0,0,0.5)
- box-shadow: 0 0 5px 5px var(--tray_2_bg)
- border-radius: 50px
- "--mdc-icon-size": 2.4em
- - type: state-label
- entity: sensor.p1s_<SERIAL>_ams_1_tray_2
- attribute: type
- tap_action:
- action: none
- style:
- top: 77%
- left: 40%
- text-align: center
- font-size: 1em
- background-color: rgba(0,0,0,0.4)
- box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
- border-radius: 50px
- pointer-events: none
- color: "#FFFFFF"
- - type: state-label
- entity: sensor.p1s_<SERIAL>_ams_1_tray_3
- tap_action:
- action: none
- style:
- top: 28%
- left: 59.65%
- text-align: center
- font-size: 0em
- background-color: var(--tray_3_color)
- opacity: 90%
- box-shadow: 0 0 3px 3px var(--tray_3_bg)
- border-radius: 2px
- width: 14%
- height: 40%
- pointer-events: none
- - type: custom:config-template-card
- entities:
- - sensor.p1s_<SERIAL>_ams_1_tray_3
- element:
- type: state-icon
- entity: sensor.p1s_<SERIAL>_ams_1_tray_3
- icon: mdi:numeric-3-circle
- style:
- top: 28%
- left: 59.7%
- "--paper-item-icon-color": white
- background-color: rgba(0,0,0,0.5)
- box-shadow: 0 0 5px 5px var(--tray_3_bg)
- border-radius: 50px
- "--mdc-icon-size": 2.4em
- - type: state-label
- entity: sensor.p1s_<SERIAL>_ams_1_tray_3
- attribute: type
- tap_action:
- action: none
- style:
- top: 77%
- left: 60%
- text-align: center
- font-size: 1em
- background-color: rgba(0,0,0,0.4)
- box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
- border-radius: 50px
- pointer-events: none
- color: "#FFFFFF"
- - type: state-label
- entity: sensor.p1s_<SERIAL>_ams_1_tray_4
- tap_action:
- action: none
- style:
- top: 28%
- left: 79.4%
- text-align: center
- font-size: 0em
- background-color: var(--tray_4_color)
- opacity: 90%
- box-shadow: 0 0 3px 3px var(--tray_4_bg)
- border-radius: 2px
- width: 14%
- height: 40%
- pointer-events: none
- - type: custom:config-template-card
- entities:
- - sensor.p1s_<SERIAL>_ams_1_tray_4
- element:
- type: state-icon
- entity: sensor.p1s_<SERIAL>_ams_1_tray_4
- icon: mdi:numeric-4-circle
- style:
- top: 28%
- left: 79.6%
- "--paper-item-icon-color": white
- background-color: rgba(0,0,0,0.5)
- box-shadow: 0 0 5px 5px var(--tray_4_bg)
- border-radius: 50px
- "--mdc-icon-size": 2.4em
- - type: state-label
- entity: sensor.p1s_<SERIAL>_ams_1_tray_4
- attribute: type
- tap_action:
- action: none
- style:
- top: 77%
- left: 79.6%
- text-align: center
- font-size: 1em
- background-color: rgba(0,0,0,0.4)
- box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.4)
- border-radius: 50px
- pointer-events: none
- color: "#FFFFFF"
- - type: conditional
- conditions:
- - entity: sensor.p1s_<SERIAL>_print_status
- state_not: offline
- elements:
- - type: conditional
- conditions:
- - entity: sensor.p1s_<SERIAL>_ams_1_ams_temperature
- state_not:
- - unavailable
- - unknown
- elements:
- - entity: sensor.p1s_<SERIAL>_ams_1_ams_temperature
- type: state-badge
- style:
- top: 50.75%
- left: 8%
- font-size: 0.75em
- color: rgba(0,0,0,0)
- - type: custom:config-template-card
- entities:
- - sensor.p1s_<SERIAL>_ams_1_humidity_index
- element:
- type: state-icon
- entity: sensor.p1s_<SERIAL>_ams_1_humidity_index
- icon: >-
- ${'fapro:humidity-level-dark-' +
- states['sensor.p1s_<SERIAL>_ams_1_humidity_index'].state
- + '#fullcolor'}
- style:
- top: 38.5%
- left: 92.5%
- background-color: "#1c1c1c"
- border-radius: 50px
- border: 0.12em solid var(--humidity-border-color)
- "--mdc-icon-size": 2.05em
- image: /local/media/bambuprinter/AMS_2.png
- camera_view: live
- card_mod:
- style: |
- ha-card {
- background: none !important;
- border: none !important;
- box-shadow: none !important;
- --humidity-border-color: {% if states('sensor.p1s_<SERIAL>_ams_1_humidity_index') != 'unavailable' and states('sensor.p1s_<SERIAL>_ams_1_humidity_index') | int > 3 %} rgba(255, 255, 126, 0.5); {% elif states('sensor.p1s_<SERIAL>_ams_1_humidity_index') != 'unavailable' and states('sensor.p1s_<SERIAL>_ams_1_humidity_index') | int > 1 %} rgba(228,127,97,1.0); {% else %} rgba(194,74,72,1.0); {% endif %}
- --tray_1_color: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_1', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_<SERIAL>_ams_1_tray_1', 'color') }}; {% endif %}
- --tray_2_color: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_2', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_<SERIAL>_ams_1_tray_2', 'color') }}; {% endif %}
- --tray_3_color: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_3', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_<SERIAL>_ams_1_tray_3', 'color') }}; {% endif %}
- --tray_4_color: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_4', 'color', '#00000000') %} rgb(255, 255, 255); {% else %} {{state_attr('sensor.p1s_<SERIAL>_ams_1_tray_4', 'color') }}; {% endif %}
- --tray_1_bg: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_1', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
- --tray_2_bg: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_2', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
- --tray_3_bg: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_3', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
- --tray_4_bg: {% if is_state_attr('sensor.p1s_<SERIAL>_ams_1_tray_4', 'active', true) %} rgba(255, 255, 126, 0.5); {% else %} rgba(0,0,0,0.5); {% endif %}
- }
- - type: picture-elements
- elements:
- - type: conditional
- conditions:
- - entity: sensor.p1s_<SERIAL>_print_status
- state_not: offline
- elements:
- - entity: light.p1s_<SERIAL>_chamber_light
- type: state-icon
- icon: far:lightbulb
- style:
- top: 46%
- left: 18%
- "--mdc-icon-size": 2.6em
- tap_action:
- action: toggle
- - entity: sensor.p1s_<SERIAL>_print_status
- type: state-label
- style:
- top: 6.5%
- left: 23.69%
- font-size: 1em
- color: "#FFFFFF"
- - type: conditional
- conditions:
- - entity: sensor.p1s_<SERIAL>_print_status
- state:
- - running
- - pause
- elements:
- - type: conditional
- conditions:
- - entity: image.p1s_<SERIAL>_cover_image
- state_not: unavailable
- elements:
- - type: custom:hui-element
- card_type: picture-entity
- show_name: false
- show_state: false
- entity: image.p1s_<SERIAL>_cover_image
- style:
- top: 50%
- left: 50%
- transform: translate(-45%, -40%) scale(75%, 75%)
- "--ha-card-border-width": 0px
- "--ha-card-background": none
- - entity: sensor.p1s_<SERIAL>_print_progress
- type: state-badge
- tap_action:
- action: none
- style:
- top: 18.5%
- left: 81%
- font-size: 1em
- color: rgba(0,0,0,0)
- "--label-badge-red": "#11739D"
- - entity: sensor.p1s_<SERIAL>_nozzle_temperature
- type: state-badge
- style:
- top: 31%
- left: 51%
- font-size: 0.8em
- color: rgba(0,0,0,0)
- - entity: sensor.p1s_<SERIAL>_bed_temperature
- type: state-badge
- style:
- top: 78%
- left: 51%
- font-size: 0.8em
- color: rgba(0,0,0,0)
- - type: conditional
- conditions:
- - entity: sensor.p1s_<SERIAL>_chamber_temperature
- state_not:
- - unavailable
- - unknown
- elements:
- - entity: sensor.p1s_<SERIAL>_chamber_temperature
- type: state-badge
- style:
- font-size: 0.8em
- top: 31%
- left: 19%
- color: rgba(0,0,0,0)
- - entity: switch.bento_switch_0
- type: state-icon
- icon: fas:fan
- style:
- top: 80%
- left: 80%
- tap_action:
- action: toggle
- - type: icon
- icon: fas:camera
- entity: camera.p1s_<SERIAL>_camera
- style:
- top: 20%
- left: 18%
- "--mdc-icon-size": 2.6em
- card_mod:
- style: |
- ha-card {
- box-shadow: none !important;
- background: none !important;
- border: none !important;
- }
- image: /local/media/bambuprinter/on_p1s.png
- entity: light.p1s_<SERIAL>_chamber_light
- state_image:
- unavailable: /local/media/bambuprinter/off_p1s.png
- "on": /local/media/bambuprinter/on_p1s.png
- "off": /local/media/bambuprinter/off_p1s.png
- title: P1S
- columns: 2
- layout_type: custom:horizontal-layout
- layout: {}
Advertisement
Add Comment
Please, Sign In to add comment