This commit is contained in:
Home Assistant Version Control
2026-10-10 07:02:58 +00:00
parent 8aa679cd78
commit 4cf7a5f254
4 changed files with 1534 additions and 12 deletions
+552
View File
@@ -1451,6 +1451,558 @@
}
}
]
},
{
"type": "grid",
"cards": [
{
"type": "custom:mushroom-title-card",
"title": "BeHappy2021 Dashboard",
"subtitle": "{{ states('sensor.sparkx_moonraker_current_print_state') }}",
"alignment": "center",
"title_tap_action": {
"action": "url",
"url_path": "http://moonraker.local/"
}
}
]
},
{
"type": "grid",
"title": "3D Printer",
"cards": [
{
"type": "custom:state-switch",
"entity": "sensor.sparkx_moonraker_current_print_state",
"transition": "flip-x",
"states": {
"unavailable": {
"type": "vertical-stack",
"cards": [
{
"type": "custom:mushroom-entity-card",
"entity": "input_text.job_filament",
"name": "Filament used in last job",
"layout": "vertical",
"tap_action": {
"action": "none"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
}
},
{
"type": "custom:mushroom-entity-card",
"entity": "input_text.total_filament",
"name": "Total Filament Used",
"layout": "vertical",
"tap_action": {
"action": "none"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
}
},
{
"type": "custom:mushroom-entity-card",
"entity": "input_text.total_jobs",
"name": "Total Jobs",
"layout": "vertical",
"tap_action": {
"action": "none"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
}
},
{
"type": "custom:mushroom-entity-card",
"entity": "input_text.total_time",
"name": "Total Time",
"layout": "vertical",
"tap_action": {
"action": "none"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
}
}
]
},
"standby": {
"type": "custom:mushroom-template-card",
"primary": "Printer is standing by",
"layout": "vertical",
"tap_action": {
"action": "url",
"url_path": "http://moonraker.local/"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
},
"icon_color": "yellow",
"icon": "mdi:printer-3d"
},
"printing": {
"type": "vertical-stack",
"cards": [
{
"type": "custom:mushroom-template-card",
"secondary": "Current filename - {{ states('sensor.sparkx_moonraker_filename') }}",
"fill_container": true,
"multiline_secondary": true,
"layout": "vertical",
"tap_action": {
"action": "url",
"url_path": "http://moonraker.local/"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
},
"icon_color": "green",
"icon": "mdi:printer-3d"
},
{
"type": "horizontal-stack",
"cards": [
{
"type": "custom:mushroom-entity-card",
"entity": "sensor.sparkx_moonraker_current_print_state",
"name": "Status",
"layout": "vertical",
"tap_action": {
"action": "none"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
}
},
{
"type": "custom:mushroom-entity-card",
"entity": "sensor.sparkx_moonraker_print_duration",
"name": "Elapsed",
"layout": "vertical",
"tap_action": {
"action": "none"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
}
},
{
"type": "custom:mushroom-entity-card",
"entity": "sensor.sparkx_moonraker_print_eta",
"name": "Completion",
"layout": "vertical",
"tap_action": {
"action": "none"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
}
},
{
"type": "custom:mushroom-entity-card",
"entity": "binary_sensor.sparkx_moonraker_filament_sensor",
"name": "Filament",
"layout": "vertical",
"tap_action": {
"action": "none"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
}
}
]
}
]
},
"complete": {
"type": "custom:mushroom-template-card",
"primary": "Printing has finished",
"layout": "vertical",
"fill_container": true,
"tap_action": {
"action": "url",
"url_path": "http://moonraker.local/"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
},
"icon_color": "green",
"icon": "mdi:printer-3d"
}
}
},
{
"type": "custom:state-switch",
"entity": "sensor.sparkx_moonraker_current_print_state",
"transition": "flip-x",
"states": {
"printing": {
"type": "vertical-stack",
"cards": [
{
"type": "tile",
"name": "Print progress..",
"icon": "mdi:clock-end",
"entity": "sensor.sparkx_moonraker_progress",
"features": [
{
"type": "bar-gauge",
"min": 0,
"max": 100
}
]
},
{
"type": "tile",
"name": "Fan speed",
"icon": "mdi:fan",
"entity": "sensor.sparkx_moonraker_hotend_fan",
"features": [
{
"type": "bar-gauge",
"min": 0,
"max": 100
}
]
},
{
"type": "tile",
"name": "Filament used",
"tap_action": {
"action": "none"
},
"icon_tap_action": {
"action": "none"
},
"entity": "sensor.sparkx_moonraker_filament_used"
},
{
"type": "picture-entity",
"show_state": false,
"show_name": false,
"camera_view": "auto",
"name": "Thumbnail",
"tap_action": {
"action": "none"
},
"icon_tap_action": {
"action": "none"
},
"entity": "camera.sparkx_moonraker_thumbnail"
}
]
},
"complete": {
"type": "vertical-stack",
"cards": [
{
"type": "tile",
"name": "Print progress..",
"icon": "mdi:clock-end",
"entity": "sensor.sparkx_moonraker_progress",
"features": [
{
"type": "bar-gauge",
"min": 0,
"max": 100
}
]
},
{
"type": "tile",
"name": "Filament used",
"tap_action": {
"action": "none"
},
"icon_tap_action": {
"action": "none"
},
"entity": "input_text.job_filament"
}
]
},
"standby": {
"type": "vertical-stack",
"cards": [
{
"type": "custom:mushroom-template-card",
"primary": "Job progress will appear here",
"layout": "vertical",
"tap_action": {
"action": "url",
"url_path": "http://moonraker.local/"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
},
"icon_color": "yellow",
"icon": "mdi:printer-3d"
},
{
"type": "tile",
"name": "Filament used in last job",
"vertical": true,
"tap_action": {
"action": "none"
},
"icon_tap_action": {
"action": "none"
},
"entity": "input_text.job_filament"
}
]
}
}
}
]
},
{
"type": "grid",
"title": " ",
"cards": [
{
"type": "custom:state-switch",
"entity": "sensor.sparkx_moonraker_current_print_state",
"transition": "flip-x",
"states": {
"unavailable": {
"type": "custom:mushroom-template-card",
"primary": "Printer turned off",
"layout": "vertical",
"tap_action": {
"action": "none"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
},
"icon_color": "red",
"icon": "mdi:printer-3d"
},
"printing": {
"type": "horizontal-stack",
"cards": [
{
"type": "custom:button-card",
"name": "Pause",
"tap_action": {
"action": "toggle"
},
"entity": "button.sparkx_moonraker_pause_print"
},
{
"type": "custom:button-card",
"name": "Resume",
"tap_action": {
"action": "toggle"
},
"entity": "button.sparkx_moonraker_resume_print"
},
{
"type": "custom:button-card",
"name": "Cancel",
"tap_action": {
"action": "toggle"
},
"entity": "button.sparkx_moonraker_cancel_print"
},
{
"type": "custom:button-card",
"name": "Emergency",
"tap_action": {
"action": "toggle"
},
"color": "red",
"confirmation": {
"text": "This will REBOOT the printer. Are you sure?"
},
"entity": "button.sparkx_moonraker_emergency_stop"
}
]
},
"standby": {
"type": "custom:mushroom-template-card",
"primary": "Controls will appear here",
"layout": "vertical",
"tap_action": {
"action": "url",
"url_path": "http://moonraker.local/"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
},
"icon_color": "yellow",
"icon": "mdi:printer-3d"
}
}
},
{
"square": true,
"type": "grid",
"columns": 1,
"cards": [
{
"type": "conditional",
"conditions": [
{
"condition": "state",
"entity": "sensor.sparkx_moonraker_current_print_state",
"state": "printing"
}
],
"card": {
"type": "custom:apexcharts-card",
"graph_span": "1h",
"span": {
"start": "hour",
"offset": "-10min"
},
"header": {
"show": true,
"title": "Temperatures",
"show_states": true,
"colorize_states": true
},
"now": {
"show": true,
"label": "Now",
"color": "#00ff00"
},
"all_series_config": {
"show": {
"legend_value": false
},
"float_precision": 0
},
"apex_config": {
"legend": {
"show": false
}
},
"series": [
{
"entity": "sensor.sparkx_moonraker_extruder_temperature",
"name": "Nozzle",
"opacity": 0.4
},
{
"entity": "number.sparkx_moonraker_extruder_target",
"name": "Nozzle target",
"opacity": 0.4
},
{
"entity": "sensor.sparkx_moonraker_bed_temperature",
"name": "Bed",
"opacity": 0.4
},
{
"entity": "number.sparkx_moonraker_bed_target",
"name": "Bed target",
"opacity": 0.4
},
{
"entity": "sensor.sparkx_moonraker_mcu_temp",
"name": "MCU",
"opacity": 0.4
}
]
}
},
{
"type": "conditional",
"conditions": [
{
"condition": "state",
"entity": "sensor.sparkx_moonraker_current_print_state",
"state": "standby"
}
],
"card": {
"type": "custom:mushroom-template-card",
"primary": "Temperatures will appear here",
"layout": "vertical",
"tap_action": {
"action": "url",
"url_path": "http://moonraker.local/"
},
"hold_action": {
"action": "none"
},
"double_tap_action": {
"action": "none"
},
"icon_color": "yellow",
"icon": "mdi:printer-3d"
}
}
]
}
]
},
{
"type": "grid",
"cards": [
{
"type": "heading",
"heading": "Spoolman",
"icon": "mdi:spool"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.active_spool",
"primary": "{{ states('sensor.active_spool') }}",
"secondary": "Active spool",
"icon": "mdi:circle",
"icon_color": "{% set sid = states('sensor.sparkx_moonraker_spool_id') | int(0) %}{% set eid = 'sensor.spoolman_spool_' ~ sid %}{% set h = state_attr(eid, 'filament_color_hex') %}{{ ('#' ~ h) if h else '#999999' }}",
"tap_action": {
"action": "more-info"
}
}
]
}
]
}